On Mon, 2005-07-04 at 13:11 +0200, Wybo Dekker wrote:
On Mon, 4 Jul 2005, John Andersen wrote:
I read his problem as being the fact that an unused ADSL connection will drop, and without some activity from the Inside, it will stay down.
He either needs to keep it up, or restart it periodically.
I had the same problem with a remote computer, and found that one ping every 3 minutes would keep it alive.
man ping
Set interval for 180 seconds, or run ping c1 from a cron job. I also found that setting -Q 4 necessary as ISPs are on to the ping trick and in many cases do not consider pings as an in-use connection and will drop you anyway.
Do you mean a ping to the modem? If so, I do already a wget to it every minute, in order to warn myself :
wget -mq -O - --http-user=wybo --http-passwd=my_password \ http://10.0.0.138/cgi/nat/* | grep 'There are no NAPT entries defined' >/dev/null && xmessage "Port 80 unreachable!!"
You might also look into using an expect program program. Expect is used running a script that would usually require an interactive session. When i was working I used it quite often to connect to Cisco routers for wide spread config changes when many, 50 +, routers needed changes. Should work very well for what you want to do. The docs have many examples. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge