LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Getting Debian router to notify via HTTP if internet is down (https://www.linuxquestions.org/questions/linux-software-2/getting-debian-router-to-notify-via-http-if-internet-is-down-553497/)

ultrasawblade 05-13-2007 02:53 AM

Getting Debian router to notify via HTTP if internet is down
 
I'm running a Debian box that is serving as a internet gateway/router/server host.

The internet comes from a cable connection on eth0 and is then routed appropriately out to eth1 by the Debian system. ip's are given to computers behind this box via dhcp (udhcpd). the Debian system itself gets its ip via dhcp. Everything is setup and works fine.

However, at times the cable connection will go down. Nothing I can do about it, it's a provider issue. However, what I would like to do is if the outage occurs while computers behind the Debian system are browsing the web, that the Debian box can redirect HTTP requests from the internal network to an internal webpage indicating the internet is down temporarily.

I can access the cable modem's diagnostic page to figure out if the connection is up or down. And redirecting HTTP requests to an internal page would have to be done by some sort of HTTP proxy server, correct? I've looked through various proxy servers and am thinking that tinyproxy would be the best one.

I'm thinking I will have to setup a script/program to execute on a regular basis (say, every minute) and check the cable modem's diagnostic page. If it indicates no connection, then reconfigure/restart the proxy to return a descriptive page. If it indicates a connection, reconfigure/restart the proxy to pass through.

However, is there some tool or combination thereof that can do this similar task better? Any suggestions or ideas?

farslayer 05-14-2007 11:45 AM

check out some of the monitoring applications..

http://bigsister.graeff.com/

there are lots to choose from this is just one example..

Tinkster 05-14-2007 01:10 PM

Or nagios ...


Cheers,
Tink


All times are GMT -5. The time now is 11:31 PM.