Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.vbc.net!garlic.com!news.scruz.net!noos.hooked.net!www.nntp.primenet.com!nntp.primenet.com!news.sgi.com!news.msfc.nasa.gov!newsfeed.internetmci.com!in1.uu.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail From: brian@awfulhak.demon.co.uk (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: PPP auto always connects Date: 10 Sep 1996 11:46:48 +0100 Organization: Coverform Ltd. Lines: 57 Message-ID: <513guo$bj@anorak.coverform.lan> References: <01bb9e00$d64bc8a0$df6d04c7@zellion.cyberwind.com> NNTP-Posting-Host: localhost.coverform.lan X-NNTP-Posting-Host: awfulhak.demon.co.uk X-Newsreader: TIN [version 1.2 PL2] Jeffery T. White (zellion@cyberwind.com) wrote: : My PPP auto connection won't disconnect and stay that way. As soon as it : times out or my ISP times me out it radials. This happens even when the BSD : system is the only thing powered on on the net so I'm sure it is something : in the system. I've tried the tcpdump but it needs some device I don't have : in my kernel and I'm hoping someone here knows the problem so I can avoid : the kernel build on a 386 :(. : I've also tried adding all the filters I can think of that won't directly : be a problem, i.e.. I have left such things as DNS alone. : I'm running 2.1.5-RELEASE, with everything pretty much as the manuals and : the web pages say to do it. The system acts as a router for 2 Win95 : machines with gateway=YES and routed -s in sysconfig. : I guess it could be worse, at least I can connect. Only thing is I have to : turn off the modem to stop it! :) I eventually got pissed off enough w/ this and sat down and thought the following: My machine keeps connecting to the net when I don't want it to. I want to stop it connecting when I don't want it to. When do I "want" it to ? When I explicitly say "connect" - w/ a timeout of 600 seconds At night (to exchange news & mail) w/ a timeout of 30 seconds I ended up writing a program called tcpchat and patching ppp so that it runs /etc/ppp/ppp.etherup<.system> on connecting (system is the label given to ppp on the command line). I now have a connect script that says something like: test $# -eq 0 && to=600 || to=$1 tcpchat localhost 3000 "> " "set timeout $to" "> " quit ping 158.152.1.222 a disconnect script that says test $# -eq 0 && to=30 || to=$1 tcpchat localhost 3000 "> " "set timeout $to" "> " close "> " quit and a ppp.conf that has the line set dfilter 0 permit 0/0 158.152.1.222 tcpchat just connects to the given machine/socket and does an expect,send routine. I'm gonna see if anyone on the hackers mailing list is interrested in it at some point.... it's also good for checking if machines are up etc. Also, I'll try to get my "execute a script after establishing a connection" ppp patches into 2.2. If anyone's interested, I'll send them the bits. -- Brian <brian@awfulhak.demon.co.uk> Don't _EVER_ lose your sense of humour....