Role to install and configure iptables
Ansible 2.4
iptables:
# Enable whole role
enabled: yes
# Flush all rules before adding role ones
flush_all: yes
# Allow NTP
ntp_allowed: yes
# List of allowed TCP ports
default_allowed_tcp_ports: [22, 80, 443]
group_allowed_tcp_ports: []
host_allowed_tcp_ports: []
# List of allowed UDP ports
default_allowed_udp_ports: []
group_allowed_udp_ports: []
host_allowed_udp_ports: []
# Any raw rules can be added
default_raw_rules: []
raw_rules: []
# Deny all which were not explicitly allowed
deny_all_unallowed: yes
# Allow ICMP
icmp_allowed: yes
None
- name: Run and configure Iptables
hosts: all
remote_user: root
roles:
- iptables
Apache 2.0
Stanislaw Bogatkin (https://sbog.ru)