RH8 - how to automatically run a shell script at boot time
Hi all.
I have created a shell script that sets iptables rules for my firewall. The script works as it should, but now I'd like this script run automatically when linux boots. Where should I copy it? Thanks |
Here is an example. You can name the script something else if you want to.
Do this while logged in as Root Save the firewall script as /etc/sysconfig/firewall. Important: Set the permissions for root to read, write and exec. Also, read and exec for group and others. Something like chomd 755 /etc/sysconfig/firewall aught to do it. Edit the /etc/rc.d/rc.local file with a path to the script. /etc/sysconfig/firewall Run the command: service iptables stop Type: source /etc/sysconfig/firewall Type: iptables-save > /etc/sysconfig/iptables Run the command: service iptables restart |
Thanks homey! It worked great for me. I appreciate the help.
|
All times are GMT -5. The time now is 06:17 PM. |