Created
March 9, 2020 18:06
-
-
Save linktohack/06dcea83bd506918308e7b601fe91704 to your computer and use it in GitHub Desktop.
Reset iptables
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
sudo iptables-save | awk '/^[*]/ { print $1 } | |
/^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } | |
/COMMIT/ { print $0; }' | sudo iptables-restore | |
sudo iptables-legacy-save | awk '/^[*]/ { print $1 } | |
/^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } | |
/COMMIT/ { print $0; }' | sudo iptables-legacy-restore | |
sudo iptables-save | |
sudo iptables-legacy-save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment