🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: uk.comp.os.linux
Article #662

Re: Freeserve time, Home highway & linux

#662
From: simno
Date: Sat, 08 Jul 2000 00:00
54 lines
2816 bytes
"Charles Blackburn" <charlesb@local-news.summerfieldtechnology.co.uk> wrote
in message
news:slrn8lpg36.67q.charlesb@local-gateway.summerfieldtechnology.co.uk...
> so how will dial-on-demand help me access my box from the other side opf
the
> country over the internet then?
>
<snip>
You could do it the way I do...
Configure dial on demand with 10 mins idle cut-off.

configure cron to run the following script every hour:-

#! /bin/sh
declare -i pingcount=0;
while !(test -e /var/run/ip-up.iface); do
 let pingcount+=1;
 logger "domail: ppp is down. Pinging $pingcount";
 ping -c 1 -w 1 195.92.195.95 > /dev/null;
 sleep 10;
done;
logger "domail: Getting mail...."
fetchmail -v -f /etc/fetchmailrc
logger "domail: Sending mail...."
sendmail -q
logger "domail: done."

Add the following to /etc/ppp/ip-up:-

 echo $INTERFACE > /var/run/ip-up.iface
 date > /tmp/ip-up-mesg
 echo $LOCALIP >> /tmp/ip-up-mesg
 cat /tmp/ip-up-mesg | mail -s "Latest connection" your@email_address

Add the following to /etc/ppp/ip-down (it might be the same file!) :-

rm /var/run/ip-up.iface

The following are in my /etc/crontab :-
5 * * * * root  /usr/bin/domail > /dev/null
15-55/10 * * * * root test -e /var/run/ip-up.iface && /usr/bin/domail >
/dev/null

The result is that the link is brought up at 5 past every hour, it
syncronises my mail accounts and then stays up for ten minutes. This allows
me to connect in remotely via ssh during the 10 minute window. As I
work away from home during tthe week, it allows me to administer my system,
collect mail etc., and start downloads.
Works very well, except I've yet to find a decent ssh client for Windows!

HTH

Simno
Technical Details
Message-ID: <8k7n4v$erf$1@newsg1.svr.pol.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8lcueu.mv0.charlesb@local-gateway.summerfieldtechnology.co.uk> <slrn8ld1hl.8o6.chris@dougal.etcp.co.uk> <d7c.39590c2a.59c54@scgf> <slrn8li6rg.1dp.tmb@cow.tm-jabarton.freeserve.co.uk> <slrn8lpg36.67q.charlesb@local-gateway.summerfieldtechnology.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10572e,cba995de6e991641
X-Google-Attributes: gid10572e,public
X-Google-Thread: 10d8ad,cba995de6e991641
X-Google-Attributes: gid10d8ad,public
X-Google-Thread: 111053,cba995de6e991641
X-Google-Attributes: gid111053,public
From: "simno" <noone@nowhere.com>
Subject: Re: Freeserve time, Home highway & linux
Date: 2000/07/08
Message-ID: <8k7n4v$erf$1@newsg1.svr.pol.co.uk>
X-Deja-AN: 643984655
References: <slrn8lcueu.mv0.charlesb@local-gateway.summerfieldtechnology.co.uk> <slrn8ld1hl.8o6.chris@dougal.etcp.co.uk> <d7c.39590c2a.59c54@scgf> <slrn8li6rg.1dp.tmb@cow.tm-jabarton.freeserve.co.uk> <slrn8lpg36.67q.charlesb@local-gateway.summerfieldtechnology.co.uk>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Complaints-To: abuse@theplanet.net
X-Trace: newsg1.svr.pol.co.uk 963076063 15215 62.137.56.23 (8 Jul 2000 17:07:43 GMT)
Organization: Customer of Planet Online
X-MSMail-Priority: Normal
NNTP-Posting-Date: 8 Jul 2000 17:07:43 GMT
Newsgroups: uk.comp.os.linux,freeserve.help.isdn,freeserve.help.unix