On Monday 04 July 2005 01:58 am, Ulf Rasch wrote:
Wybo Dekker wrote:
My adsl-modem looses its NAPT address, making my machine inaccessable from the outside, and I planned having my holidays..
I can detect the address-loss in a cron job, and I can restore it with a telnet session:
$ telnet 10.0.0.138 Connected to 10.0.0.138. Escape character is '^]'. Username : wybo Password : ****** [...] =>nat create protocol=tcp outside_addr=84.84.54.213 outside_port=80 \ inside_addr=10.0.0.150 inside_port=80 =>exit
But, being absent when this happens - is there a way to do this from the cron job?
You should maybe look into the free service of dyndns.org. They provide a list of links for software for linux too.
It basicly works like this: You devine a hostname which points to your adsl-modem. Through a cron job you check your ip and when there is a change it updates the ip your hostname is pointing at. That way your box will be accessable through the same hostname from the outside.
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. -- _____________________________________ John Andersen