Code Monkey home page Code Monkey logo

ansible-portforward's Introduction

Build Status ansible-portforward

This ansible role deploys portfoward script that controls iptables for Ubuntu 12.04 (tested on vagrant)

##Prerequisite

  • Having ansible installed on your workstation.

##How to install

  • Use github to clone/fork in your role directory
  • ansible galaxy ansible-galaxy install adham.helal.portforward

##Variables All the default variables are located defaults/main.yml. Mostly you would need to configure the following variables.

  • PFRules: You can define one or more portfoward rules

    PFRules:
    - Type: m
      Interface: eth0
      LocalPort: 2222
      DestPort : 22
      DestIP   : 12
      Comment  : "eth0:2222->127.0.0.1:22"
    
    - Type: n
      Interface: eth0
      LocalPort: 8080
      DestPort : 80
      DestIP   : 127.0.0.1
      Comment  : "eth0:8080->127.0.0.1:80" 
    

    Type: Either "n" for nat or "m" for masquerade

    Interface: network interface

    LocalPort: Local Port

    DestPort:Destination port

    DestIP: Destination IP

    Comment: Comments

##Configure You can configure your variables in ansible with one of the following

  • Create a variable in host/group variables directory (recommended)
  • Editing var/main.yml
  • Run ansible-playbook with -e
  • Edit the default/main.yml (not recommended)

##Run By default nothing will happen if you deploy witout configuration

ansible-playbook -l hostname portforward.yml

ansible-portforward's People

Contributors

ahelal avatar

Watchers

 avatar  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.