Click to See Complete Forum and Search --> : Where to put firewall script to start at boot


Algemon
01-14-2001, 10:09 AM
I have recently changed to Debian for a try.

In RedHat the whole structure of the directories in /etc/ was different but there was a file called /etc/rc.d/rc.local where I put a line like:
sh /etc/rc.d/myfirewall

Where should I put such a line in Debian? There is no such rc.local file to find. I don't really understand the order of calling of files at bootup so don't really know what I am looking for in terms of the best place to put such a call to run the firewall script.

Thanks for help.

Craig McPherson
01-14-2001, 02:53 PM
You can do this however you want to. Debian is about choice and freedom and power.

Here's what I did:

1. I stuck my firewall script (actually, a connection script that calls my firewall script and does a number of other things) in /usr/local/sbin

2. I stuck a script called "local" in /etc/init.d. I have this local script, among other thing, call my connection/firewall script, and do any other "local" stuff I want to do during bootup.

3. I symlinked the "local" script from my /etc/rc2.d directory (since I boot into runlevel 2) like this:

ln -s /etc/init.d/local /etc/rc2.d/S95local

That makes it so my "local" script gets called near the end of bootup, and it in turn calls my firewall script.

------------------
http://users.ipa.net/~cmcpher/paminv.gif DEBIAN (http://www.debian.org/) http://users.ipa.net/~cmcpher/paminv.gif
It turns girls into statues!

[This message has been edited by Craig McPherson (edited 14 January 2001).]

Algemon
01-15-2001, 03:12 AM
That makes total sense - thanks Craig.

nanode
01-16-2001, 12:51 PM
Maybe I'm a traditionalist, but I've always put mine: /etc/rc.d/rc.firewall