-
-
Save palawer/a10eb54236c37f78c85fd2749715beaf to your computer and use it in GitHub Desktop.
iptables - delete all rules/chains
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
#view current chains | |
$ iptables -L | |
#remove/flush all rules & delete chains | |
$ iptables -F | |
$ iptables -X | |
$ iptables -t nat -F | |
$ iptables -t nat -X | |
$ iptables -t mangle -F | |
$ iptables -t mangle -X | |
$ iptables -P INPUT ACCEPT | |
$ iptables -P OUTPUT ACCEPT | |
$ iptables -P FORWARD ACCEPT | |
-F : Deleting (flushing) all the rules. | |
-X : Delete chain. | |
-t table_name : Select table (called nat or mangle) and delete/flush rules. | |
-P : Set the default policy (such as DROP, REJECT, or ACCEPT). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment