-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Darcy Brodie wrote:
> Hello everyone
> 
> I have been trying to find a simple solution for an on going problem. 
> 
> I have a Linux based firewall / router located out of town.  It connects 
> to the Internet via a satellite connection (the only other option is 
> dial-up internet)
> Due to several factors, at times the connection can be less than 
> favorable, and  we have to go and manually obtain the IP address from 
> the ISP (after someone discovers that there is no connection again)
> When I am there, I have found is that simply restarting the network 
> service will re-establish the connection.
> 
> 
> Is there a way. that the Linux machine can monitor the status of the 
> incoming connection from the ISP, and attempt to restore the connection 
> if it is lost?  And continue to attempt to re-connect to the ISP until 
> connection is restored (sometimes, this can be hours due to weather). 
> 
I have done something similar in the past.  A simple shell script that
cron runs every 5 minutes was my solution.

In my shell script was a function:

CheckNet ()
{
  ping -c 1 $PINGHOST  >& /dev/null ; # Checking to see if we have net
connectivity to the backup server
}

Then based on the success or failure the script did something else.  On
a Debian or Ubuntu machine, you could restart the interface with the
following commands:

ifdown eth0
ifup eth0

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIviRpwRXgH3rKGfMRAs4bAJ0cu0WEbtiJir2I10Nz37U/l+kflwCeOCm8
zm/OyQ+PhgqJHCAv+2qjUew=
=7cOc
-----END PGP SIGNATURE-----

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to