Created
May 27, 2016 22:14
-
-
Save Norcoen/30bea933a2135a08284cba9065cf77c4 to your computer and use it in GitHub Desktop.
Reset iptables
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
# IPv6 | |
## | |
## set default policies to let everything in | |
ip6tables --policy INPUT ACCEPT; | |
ip6tables --policy OUTPUT ACCEPT; | |
ip6tables --policy FORWARD ACCEPT; | |
## | |
## start fresh | |
ip6tables -Z; # zero counters | |
ip6tables -F; # flush (delete) rules | |
ip6tables -X; # delete all extra chains | |
# IPv4 | |
## | |
## set default policies to let everything in | |
iptables --policy INPUT ACCEPT; | |
iptables --policy OUTPUT ACCEPT; | |
iptables --policy FORWARD ACCEPT; | |
## | |
## start fresh | |
iptables -Z; # zero counters | |
iptables -F; # flush (delete) rules | |
iptables -X; # delete all extra chains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment