Created
January 27, 2014 12:43
-
-
Save dtanham/8647893 to your computer and use it in GitHub Desktop.
Remove firewall rules from default Debian build
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
#!/bin/sh | |
# This file will reset the firewall to allow everything. | |
# | |
# Set the default policy | |
# | |
/sbin/iptables -P INPUT ACCEPT | |
/sbin/iptables -P FORWARD ACCEPT | |
/sbin/iptables -P OUTPUT ACCEPT | |
# | |
# Set the default policy for the NAT table | |
# | |
/sbin/iptables -t nat -P PREROUTING ACCEPT | |
/sbin/iptables -t nat -P POSTROUTING ACCEPT | |
/sbin/iptables -t nat -P OUTPUT ACCEPT | |
# | |
# Delete all rules | |
# | |
/sbin/iptables -F | |
/sbin/iptables -t nat -F | |
# | |
# Delete all chains | |
# | |
/sbin/iptables -X | |
/sbin/iptables -t nat -X | |
# End message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment