My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo
I want to make it execute on boot. Is there a certain way that i should be doing it? I need to make sure that it executes everytime the server is restarted?
Im not sure if i should just put the script inside rc.local. Thanks |
Check to make certain that iptables really is a script, not a data file created by iptables-save. In my Mandrake 8.1 system, it's a data file, and I added to rc.local the line "/sbin/iptables-restore" in order to re-create the rules at boot. I also created a daily cron job for root, to do "/sbin/iptables-save" each night, so that any rules added by portsentry during the day would be saved...
Check out your actual initialization scripts to see for certain that the "start" and "stop" actions for iptables use the /etc/sysconfig/iptables data or script... I suspect, though, that most recent distributions will be rather similar to what I have here. |
yeah, just link it there. that's normal.
|
go into your script directory and make the script executable. (chmod 755 scriptname)
go into /etc/rc.d/rc3.d and create a symlink to the script. Call the link Sxxfirewall, where xx is a number that corresponds to which order you want it to execute it. eg: S90dhcp will run before S92firewall. |
All times are GMT -5. The time now is 02:33 AM. |