This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to restart the firewall from internal network?

Hi everyone!

Dunno if this is the place to this post, but please i need help.

We have a firewall to Internet in our office, with 3 interfaces (control, internet and intranet) and other internal firewall and servers in the intranet, but this is not important.

I need to restart the internet firewall from a PC inside the network. I need to do that automatically, when one interface goes down. I have in a PC with Windows 2000 Pro a program making pings to the firewall, and when it stops answering, the program should restart the firewall. But here is the problem, there is Linux in the firewall, and I should need to write on the shell of linux from a local network PC with Windows.

This must be automatized, becouse the firewall crashes when we run a process at night and there is nobody in the office.

Maybe I could create a process in the firewall to restart it when any interface crashes, but anyway dunno how to do it.

Please, could anyone help me to do something like that?
Thanks.


This thread was automatically locked due to age.
  • Just type in the following line on console:

    (while ping -i 2 -c 5 -w 10 12.12.12.12; do sleep 2; done; reboot) &> /dev/null &

    Replace 12.12.12.12 with a pingable IP connected to the interface you like to monitor. That's all. The firewall will reboot, if the host is not pingable any more within ~10-20 seconds.

    To execute the script at startup just insert the following line in /etc/rc.d/rc.astaro.
    (sleep 120; while ping -i 2 -c 5 -w 10 12.12.12.12; do sleep 2; done; reboot) &> /dev/null &
  • Thanks a lot! It was just what i was looking for!
    Ill try it in a server with a backup of the firewall and if all works it will be great.
    Thanks again, Xeno.