Created
June 27, 2013 03:41
-
-
Save petrabarus/5873771 to your computer and use it in GitHub Desktop.
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="$(which iptables)" | |
# RESET DEFAULT POLICIES | |
$IPTABLES -P INPUT ACCEPT | |
$IPTABLES -P FORWARD ACCEPT | |
$IPTABLES -P OUTPUT ACCEPT | |
$IPTABLES -t nat -P PREROUTING ACCEPT | |
$IPTABLES -t nat -P POSTROUTING ACCEPT | |
$IPTABLES -t nat -P OUTPUT ACCEPT | |
$IPTABLES -t mangle -P PREROUTING ACCEPT | |
$IPTABLES -t mangle -P OUTPUT ACCEPT | |
# FLUSH ALL RULES, ERASE NON-DEFAULT CHAINS | |
$IPTABLES -F | |
$IPTABLES -X | |
$IPTABLES -t nat -F | |
$IPTABLES -t nat -X | |
$IPTABLES -t mangle -F | |
$IPTABLES -t mangle -X |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment