Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules
Posted in Security
#!/bin/bash # Linux Firewall: Simple Shell Script To Stop and Flush All Iptables Rules # Some Linux distros like Debian do not have /etc/init.d/iptables stop script # This can be also called from cron job if you are testing new firewall on # remote box to avoid lock out # ------------------------------------------------------------------------- # Copyright (c) 2004 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- 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
Download - Email this to a friend - Printable version
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: bash linux, firewall iptables, flush firewall script, iptables command, linux distros, linux firewall, shell script, stop firewall script ~ Last updated on: April 24, 2008

