yabusygin.iptables

Ansible Role for iptables Managed Firewall

DEPRECATED. Use the Ansible collection yabusygin.netfilter instead.

This Ansible role sets up a firewall using iptables. The rules you set for the firewall will stay active even after a reboot.

Requirements

No special requirements.

Role Variables

You can use the variables iptables_rules_ipv4 and iptables_rules_ipv6 to point to your own custom rule files (for IPv4 and IPv6). These files should be in the format that the commands iptables-save (for IPv4) and ip6tables-save (for IPv6) would produce.

Dependencies

No dependencies.

Example Playbook

---
- name: Example playbook
  hosts: server
  tasks:
    - name: Configure firewall
      ansible.builtin.import_role:
        name: yabusygin.iptables
      vars:
        iptables_rules_ipv4: config/iptables.ipv4.rules
        iptables_rules_ipv6: config/iptables.ipv6.rules

License

MIT

Author Information

Alexey Busygin <yaabusygin@gmail.com>

Informazioni sul progetto

An Ansible role that configures persistent iptables rules.

Installa
ansible-galaxy install yabusygin.iptables
Licenza
mit
Download
89
Proprietario