-   Linux - Networking (
-   -   Firewall Start at Boot (

canuck_dude 02-01-2007 12:25 AM

Firewall Start at Boot

I made a firewall using iptables and have it in a shell script. How do I make the script execute at boot time so it gets automatically setup? I tried putting it in the /etc/rc.d/rc.local file but it always crashes my computer when I restart. I'm using Fedora Core 6.

wildar 02-01-2007 01:04 AM

First you should test the script before including it any start up scripts. Use your favorite text editor, enter the stuff, save and exit. From a shell make it executable using chmod, example

chmod 744 testscript
Then run the script and see what happens.

Might help if you posted the script in code box for us to review.

canuck_dude 02-01-2007 01:24 AM

I've already tested script and there's nothing wrong with it.

wildar 02-01-2007 01:30 AM

Ok then, lets have a look at the rc.local with your script included.

canuck_dude 02-01-2007 01:38 AM


# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

. /etc/rc.d/rc.firewall

MQMan 02-01-2007 01:59 AM

Not sure why it would "crash" your system, but you don't need the (dot space) at the front of the line when you're running it from rc.local.


All times are GMT -5. The time now is 04:51 PM.