Code Monkey home page Code Monkey logo

otus-task20's Introduction

Задание: Сценарии iptables

Что нужно сделать?

реализовать knocking port centralRouter может попасть на ssh inetrRouter через knock скрипт пример в материалах. добавить inetRouter2, который виден(маршрутизируется (host-only тип сети для виртуалки)) с хоста или форвардится порт через локалхост. запустить nginx на centralServer. пробросить 80й порт на inetRouter2 8080. дефолт в инет оставить через inetRouter.

Решение

С помощью Vagrant создаётся стенд, состоящий из следующих хостов:

  1. inetRouter1
  2. inetRouter2
  3. centralRouter
  4. centralServer

С помощью ansible устанавливается:

  • nginx на centralServer
  • traceroute на все хосты
  • knockd на inetRouter1

Конфигурации сетей и iptables находятся в каталоге templates. Комментарии по работе Ansible приведены в самом плейбуке.

Результат работы стенда:

  1. Доступ в интернет с хоста centralServer через inetRouter1: Alt text

  2. Доступ по ssh с хоста centralRouter к хосту inetRouter1 только с использованием knokd: Alt text

  3. Доступ к html странице на centralServer с хостовой машины: Alt text

otus-task20's People

Contributors

nargamard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.