Created
June 4, 2020 15:09
-
-
Save dyllanwli/955ef8f0108c374ef5aa465044f51969 to your computer and use it in GitHub Desktop.
Reset your 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
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
# https://serverfault.com/questions/200635/best-way-to-clear-all-iptables-rules | |
# To answer your question succinctly, no: there would not be any "leftover" rules after flushing every table. In the interest of being thorough however, you may want to set the policy for the built-in INPUT and FORWARD chains to ACCEPT, as well | |
iptables -P OUTPUT ACCEPT | |
iptables -t nat -F | |
iptables -t mangle -F | |
iptables -F | |
iptables -X | |
ip6tables -P INPUT ACCEPT | |
ip6tables -P FORWARD ACCEPT | |
ip6tables -P OUTPUT ACCEPT | |
ip6tables -t nat -F | |
ip6tables -t mangle -F | |
ip6tables -F | |
ip6tables -X |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment