Results 1 to 2 of 2
Hello! (CentOS server)
How can I create a script will run the following command:
# sysctl-w Net.ipv4.ip_forward = 1
- I need the script to work automatically between the hours: ...
- 12-28-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 18
Enable IP Forwarding on the fly
Hello! (CentOS server)
How can I create a script will run the following command:
# sysctl-w Net.ipv4.ip_forward = 1
- I need the script to work automatically between the hours: 3:00 to 6:00 at night.
Meanwhile I run the script manually at night with my computer:
sysctl-w Net.ipv4.ip_forward = 0;
sleep 2;
sysctl-w Net.ipv4.ip_forward = 1;
sleep 1200;
sh Xxx.sh;
So what do you say?
How to solve the problem?
How can I run the script without any software? (SSH)
Thank you.
- 12-28-2009 #2
I say you use the crontab to execute the commands at the given times.
Debian GNU/Linux -- You know you want it.


Reply With Quote