iptablesrocks.org - Deploying a Safetynet
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
As you can see, the INPUT, OUTPUT and FORWARD chains of your firewall are now set to a default "ACCEPT" state. This means that your server
will accept any packets, be they OUTBOUDN, INBOUND or FORWARDED. In other words, you have no firewall at this point. So now that we know the
script works, let's put it into the server's crontab.
We'll create a crontab entry that resets the firewall every 15 minutes.
crontab -e
0,15,30,45 * * * * /sbin/iptables-restore < /root/firewall_reset
That's it. Now save and exit out of the crontab editor.
That's it. Until the crontab is disabled, your server's iptables ruleset will reset every 15 minutes. This means that if you lock yourself out later on in this
setup guide, you'll only have to wait a maximum of 15 minutes before the firewall resets and the erroneous rules are dropped.
Note: Obviously, once you finally get your firewall safely configured you will want to disable this crontab entry. ;)
So now let's get down to business and deploy the firewall script!
Proceed to the next step
home
|
syntax & structure
|
examples
|
faq
|
contact
|
links
Site last modified:
February 13, 2004 15:27:51
http://www.iptablesrocks.org/guide/safetynet.php (2 of 2) [2/13/2004 8:04:53 PM]