https://github.com/lukaspustina/ansible-role-iptables
Ansible role to install UFW and configure iptables firewall rules.
https://github.com/lukaspustina/ansible-role-iptables
Last synced: 2 months ago
JSON representation
Ansible role to install UFW and configure iptables firewall rules.
- Host: GitHub
- URL: https://github.com/lukaspustina/ansible-role-iptables
- Owner: lukaspustina
- License: gpl-2.0
- Created: 2015-12-31T15:45:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-28T15:23:59.000Z (about 6 years ago)
- Last Synced: 2025-02-02T02:18:43.198Z (4 months ago)
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
iptables
========Installs UFW and configures iptables firewall rules.
Requirements
------------None.
Role Variables
--------------`_iptables` containes the rules and general settings.
Dependencies
------------None.
Example Playbook
----------------```
- hosts: servers
vars:
IPTABLES:
default_policy:
incoming: reject
state: enabled
rules:
- interface: eth0
ip: "{{ ansible_eth0.ipv4.address }}"
ports:
- { name: ssh, port: 22, proto: tcp, direction=in, rule=allow, delete: no }
- { name: http, port: 80 }
- { name: https, port: 443 }
- interface: eth0
ip: "{{ ansible_eth0.ipv6[0].address }}"
ports:
- { name: ssh, port: 22, proto: tcp, direction=in, rule=allow, delete: no }
roles:
- { role: iptables, tags: ['iptables'], _iptables: "{{ IPTABLES }}" }
```License
-------See LICENSE file.
Author Information
------------------Initially created by Lukas Pustina [@drivebytesting](https://twitter.com/drivebytesting).