Giter Club home page Giter Club logo

ansible-role-firewall's Introduction

Ansible Role: Firewall

Ansible Galaxy MIT License Build Status

An Ansible role that manages an Iptables Firewall on Ubuntu 14.04

Requirements

None

Role Variables

Ansible variables are listed here along with their default values:

firewall_policy_input sets the default policy for the INPUT chain:

firewall_policy_input: "DROP"

firewall_policy_forward sets the default policy for the FORWARD chain:

firewall_policy_forward: "DROP"

firewall_policy_output sets the default policy for the OUTPUT chain:

firewall_policy_output: "ACCEPT"

firewall_log_dropped_packets flags whether dropped packets should be logged:

firewall_log_dropped_packets: true

firewall_ssh_port sets an open port for SSH traffic

firewall_ssh_port: 22

firewall_allowed_tcp_ports is a list of open TCP ports:

firewall_allowed_tcp_ports: [80, 443]

firewall_allowed_udp_ports is a list of open UDP ports:

firewall_allowed_udp_ports: []

firewall_forwarded_tcp_ports is a list of forwarded TCP ports. Each element in the list may designate:

  • src required The source port

  • dest required The destination port

    firewall_forwarded_tcp_ports: []

firewall_forwarded_udp_ports is a list of forwarded UDP ports. Each element in the list may designate:

  • src required The source port

  • dest required The destination port

    firewall_forwarded_udp_ports: []

firewall_additional_rules is a list of additional Iptables rules added verbatim. For example: firewall_additional_rules: ["iptables -A OUTPUT -f -d 192.168.1.1 -j DROP"]

firewall_additional_rules: []

Dependencies

None

Example Playbook

---
- hosts: all
  vars:
  - firewall_ssh_port: 2222
  - firewall_allowed_tcp_ports: [80, 32400]
  roles:
  - novuso.firewall

License

This is released under the MIT license.

ansible-role-firewall's People

Contributors

johnnickell avatar

Watchers

James Cloos avatar John Nickell 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.