You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+22-6
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,7 @@ After I found out `UFW` was too limited in terms of functionalities, I tried sev
15
15
16
16
This role is an attempt to solve these requirements.
17
17
18
-
It supports **ipv4** and **ipv6*** on Debian and RedHat distributions.
19
-
20
-
*ipv6 support was brought up thanks to [@maloddon](https://github.com/maloddon). It is currently in early stages and knowledgable people should review the [default rules](https://github.com/mikegleasonjr/ansible-role-firewall/blob/master/defaults/main.yml). ipv6 rules are not configured by default. If you which to use them, don't forget to set `firewall_v6_configure` to `true`.
18
+
It supports **ipv4** and **ipv6*** on Debian and RedHat distributions. ipv6 rules are not configured by default. If you which to use them, don't forget to set `firewall_v6_configure` to `true`.
21
19
22
20
Requirements
23
21
------------
@@ -36,9 +34,19 @@ Role Variables
36
34
`defaults/main.yml`:
37
35
38
36
```
37
+
---
39
38
firewall_v4_configure: true
40
39
firewall_v6_configure: false
41
40
41
+
firewall_v4_flush_rules:
42
+
- -F
43
+
- -X
44
+
- -t raw -F
45
+
- -t raw -X
46
+
- -t nat -F
47
+
- -t nat -X
48
+
- -t mangle -F
49
+
- -t mangle -X
42
50
firewall_v4_default_rules:
43
51
001 default policies:
44
52
- -P INPUT ACCEPT
@@ -58,6 +66,15 @@ firewall_v4_default_rules:
58
66
firewall_v4_group_rules: {}
59
67
firewall_v4_host_rules: {}
60
68
69
+
firewall_v6_flush_rules:
70
+
- -F
71
+
- -X
72
+
- -t raw -F
73
+
- -t raw -X
74
+
- -t nat -F
75
+
- -t nat -X
76
+
- -t mangle -F
77
+
- -t mangle -X
61
78
firewall_v6_default_rules:
62
79
001 default policies:
63
80
- -P INPUT ACCEPT
@@ -76,18 +93,17 @@ firewall_v6_default_rules:
76
93
- -P INPUT DROP
77
94
firewall_v6_group_rules: {}
78
95
firewall_v6_host_rules: {}
79
-
80
96
```
81
97
82
-
The keys to the `*_rules` dictionaries (`001 default policies`, `002 allow loopback`, ...) can be anything. They are only used for rules **ordering** and **overriding**. On rules generation, the keys are sorted alphabetically. That's why I chose here the 001s and 999s.
98
+
The keys to the `*_rules` dictionaries, except the flush rules, can be anything. They are only used for rules **ordering** and **overriding**. On rules generation, the keys are sorted alphabetically. That's why I chose here the 001s and 999s.
83
99
84
100
Those defaults will generate the following script to be executed on the host (for ipv4):
0 commit comments