4a9d8b32e2
Some jobs need to start with a clean slate of firewall rules so that they can manage their own rules. Add a simple role that clears out everything. Change-Id: I92d3b02a6bd4f19460294ca5293dfbbd67bfd295
21 lines
438 B
YAML
21 lines
438 B
YAML
- name: Clear iptables rules
|
|
become: true
|
|
shell: |
|
|
iptables -P INPUT ACCEPT
|
|
iptables -P FORWARD ACCEPT
|
|
iptables -P OUTPUT ACCEPT
|
|
iptables -t nat -F
|
|
iptables -t mangle -F
|
|
iptables -F
|
|
iptables -X
|
|
ip6tables -P INPUT ACCEPT
|
|
ip6tables -P FORWARD ACCEPT
|
|
ip6tables -P OUTPUT ACCEPT
|
|
ip6tables -t nat -F
|
|
ip6tables -t mangle -F
|
|
ip6tables -F
|
|
ip6tables -X
|
|
|
|
iptables -L
|
|
ip6tables -L
|