Last active
October 27, 2017 08:03
-
-
Save sq3/d3185421e5c2bcf755e271689fb22394 to your computer and use it in GitHub Desktop.
Clear iptables rules
This file contains 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 | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t nat -Z | |
iptables -t filter -F | |
iptables -t filter -X | |
iptables -t filter -Z | |
iptables -t mangle -F | |
iptables -t mangle -X | |
ip6tables -P INPUT ACCEPT | |
ip6tables -P OUTPUT ACCEPT | |
ip6tables -P FORWARD ACCEPT | |
ip6tables -F | |
ip6tables -X | |
ip6tables -t nat -F | |
ip6tables -t nat -X | |
ip6tables -t nat -Z | |
ip6tables -t filter -F | |
ip6tables -t filter -X | |
ip6tables -t filter -Z | |
ip6tables -t mangle -F | |
ip6tables -t mangle -X | |
ip6tables -t mangle -Z | |
ip6tables -t mangle -Z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment