GithubHelp home page GithubHelp logo

kennethgillen / ansible-role-iptables-raw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ome/ansible-role-iptables-raw

0.0 2.0 0.0 11 KB

Ansible module to import iptables_raw library

Python 100.00%

ansible-role-iptables-raw's Introduction

Iptables Raw

Import the Iptables Raw library and make it available as a task. Ensure iptables is active.

See these links for full documentation on the iptables_raw module:

Parameters

Optional:

  • iptables_raw_disable_firewalld: Disable the firewalld service (if installed and enabled it will conflict), default True

Development

The library/iptables_raw.py version is https://github.com/Nordeus/ansible_iptables_raw/tree/34672590224f393016ad086f82054319108e67ad (2018-02-18) with the following change to prevent ansible-lint/flake8 failing:

diff --git a/library/iptables_raw.py b/library/iptables_raw.py
index 71dfc0d..978a6c7 100644
--- a/library/iptables_raw.py
+++ b/library/iptables_raw.py
@@ -344,7 +344,7 @@ class Iptables:
     def _is_debian(self):
         return os.path.isfile('/etc/debian_version')

-    # If /etc/arch-release exist, this means this is an ArchLinux OS
+    # If /etc/arch-release exist, this means this is an ArchLinux OS
     def _is_arch_linux(self):
         return os.path.isfile('/etc/arch-release')

Example Playbook

- hosts: localhost
  roles:
    - role: iptables-raw

  tasks:
    # Block all incoming connections apart from ssh
    - iptables_raw:
        name: test_rules
        keep_unmanaged: no
        rules: |
          -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
          -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
          -A INPUT -j REJECT
          -A FORWARD -j REJECT
          -A OUTPUT -j ACCEPT
        state: present

Author Information

[email protected]

ansible-role-iptables-raw's People

Contributors

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