1

Am trying to do some routing on a remote Linux server, every time something goes wrong i lose connection and i have to call the IT guy there and ask him to restart the network interfaces or sometimes reboot the server to get rid of the bad routes i inserted.

I tried to make cron restart networking every 7 minutes to reset the route table by running /etc/init.d/networking restart but its not restarting. i tried making cron run a bash file that has that command in it and still the same.

Is there anyway to reset the route table via cron ?

zertux
  • 151
  • 1
  • 14

1 Answers1

3

You need to make sure you are running the cron job as root. Otherwise, you will get permission denied error and cron job will not run.

IMHO, this is not a good solution to your problem. This is really unacceptable especially if you are doing it on a production server. Restarting the network on a server will drop all connections and can cause data loss. You need to find the root-cause of this issue and try to fix it.

Khaled
  • 36,533
  • 8
  • 72
  • 99