Created
November 18, 2018 17:56
-
-
Save mrdotb/86764223a75f4ca41dd35691ec2e876d 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