|
@@ -1,8 +1,8 @@
|
|
OS Firewall
|
|
OS Firewall
|
|
===========
|
|
===========
|
|
|
|
|
|
-OS Firewall manages firewalld and iptables firewall settings for a minimal use
|
|
|
|
-case (Adding/Removing rules based on protocol and port number).
|
|
|
|
|
|
+OS Firewall manages firewalld and iptables installation.
|
|
|
|
+case.
|
|
|
|
|
|
Note: firewalld is not supported on Atomic Host
|
|
Note: firewalld is not supported on Atomic Host
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1403331
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1403331
|
|
@@ -18,8 +18,6 @@ Role Variables
|
|
| Name | Default | |
|
|
| Name | Default | |
|
|
|---------------------------|---------|----------------------------------------|
|
|
|---------------------------|---------|----------------------------------------|
|
|
| os_firewall_use_firewalld | False | If false, use iptables |
|
|
| os_firewall_use_firewalld | False | If false, use iptables |
|
|
-| os_firewall_allow | [] | List of service,port mappings to allow |
|
|
|
|
-| os_firewall_deny | [] | List of service, port mappings to deny |
|
|
|
|
|
|
|
|
Dependencies
|
|
Dependencies
|
|
------------
|
|
------------
|
|
@@ -29,34 +27,27 @@ None.
|
|
Example Playbook
|
|
Example Playbook
|
|
----------------
|
|
----------------
|
|
|
|
|
|
-Use iptables and open tcp ports 80 and 443:
|
|
|
|
|
|
+Use iptables:
|
|
```
|
|
```
|
|
---
|
|
---
|
|
- hosts: servers
|
|
- hosts: servers
|
|
- vars:
|
|
|
|
- os_firewall_use_firewalld: false
|
|
|
|
- os_firewall_allow:
|
|
|
|
- - service: httpd
|
|
|
|
- port: 80/tcp
|
|
|
|
- - service: https
|
|
|
|
- port: 443/tcp
|
|
|
|
- roles:
|
|
|
|
- - os_firewall
|
|
|
|
|
|
+ task:
|
|
|
|
+ - include_role:
|
|
|
|
+ name: os_firewall
|
|
|
|
+ vars:
|
|
|
|
+ os_firewall_use_firewalld: false
|
|
```
|
|
```
|
|
|
|
|
|
-Use firewalld and open tcp port 443 and close previously open tcp port 80:
|
|
|
|
|
|
+Use firewalld:
|
|
```
|
|
```
|
|
---
|
|
---
|
|
- hosts: servers
|
|
- hosts: servers
|
|
vars:
|
|
vars:
|
|
- os_firewall_allow:
|
|
|
|
- - service: https
|
|
|
|
- port: 443/tcp
|
|
|
|
- os_firewall_deny:
|
|
|
|
- - service: httpd
|
|
|
|
- port: 80/tcp
|
|
|
|
- roles:
|
|
|
|
- - os_firewall
|
|
|
|
|
|
+ tasks:
|
|
|
|
+ - include_role:
|
|
|
|
+ name: os_firewall
|
|
|
|
+ vars:
|
|
|
|
+ os_firewall_use_firewalld: true
|
|
```
|
|
```
|
|
|
|
|
|
License
|
|
License
|