LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   make a call (https://www.linuxquestions.org/questions/linux-general-1/make-a-call-268475/)

bhughesiii 12-20-2004 01:03 PM

make a call
 
Where would I add, and what syntax would I use to run a firewall script at start up so to be sure that my custon firewall rules are applied?

Mara 12-20-2004 02:40 PM

It depends. If you already have a script (probably generated automaticaly) you may add your rules to that file (but be careful when running the tool to generate firewall again, because your rules may be overwritten) or create your own one and run it from /etc/rc.local or make it an init.d script (the ones you run with start etc). Such script if usually build (filled) from template (look for a skeleton file).

bhughesiii 12-20-2004 02:44 PM

i created a script called firewall and put it in /etc/rc.d/init.d and it is executable... however it does not run on startup

Mara 12-20-2004 02:49 PM

It's not enough to put it only in /etc/rc.d/init.d, but you're close. Now check which runlevel you're running (the command is 'runlevel') and symlink the script you just created to /etc/rc.d/rcX.d/SYYfirewall (example), where X is the runlevel and YY is a number. Make sure it's after your orginal firewall (scripts are run in order of the numbers, S means to start it). Example filename /etc/rc.d/rc5.d/S80firewall.

bhughesiii 12-23-2004 09:12 AM

Mara, thanks a million.. That solution worked for me.. I am also using it to add routes after networking is loaded.. I hate that I cannot make my routing table permanent


All times are GMT -5. The time now is 08:12 PM.