Last active
May 10, 2021 18:43
-
-
Save epcim/c3a2529d0b05f089f77f to your computer and use it in GitHub Desktop.
iptables-flush-rules.sh.howto.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Stopping firewall, clean all rules..." | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -t nat -F | |
iptables -t mangle -F | |
iptables -F | |
iptables -X | |
#Clear ip6tables rules: | |
ip6tables -P INPUT ACCEPT | |
ip6tables -P FORWARD ACCEPT | |
ip6tables -P OUTPUT ACCEPT | |
ip6tables -t nat -F | |
ip6tables -t mangle -F | |
ip6tables -F | |
ip6tables -X |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment