Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Feb 1996 01:48:05 -0800 (PST)
From:      Donald Burr <d_burr@ix.netcom.com>
To:        Binh Do <binhdo@binhdo.home.cs.ubc.ca>
Cc:        questions@freebsd.org
Subject:   Re: How to disconnect phone in "on-demand" mode
Message-ID:  <Pine.BSF.3.91.960207013509.741A-101000@starfleet.gov>
In-Reply-To: <199602070510.VAA00251@binhdo.home.cs.ubc.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1012909815-823686485=:741
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 6 Feb 1996, Binh Do wrote:

> At last it seems that I can dial to my ISP on demand. Now one problem arises.
> If I want to just cjeck mail and right after that I want to disconnect 
> and use phone. How should I do it gracefully (i.e. not just pick up the phone
> without doing anything with FreeBSD).
> 
> Cheers,

There are two ways to do this.  One way is to set the "timeout" value 
really low, like 10 or 5 (disconnects after 10 or 5 seconds 
(respectively) of inactivity).  This is fine for when you just want to 
read mail and disconnect, but may get in your way if you're trying to do 
some "real" work, such as ftp or other internet stuff.

There is another way, whcih I use and like... but you may not...

I wrote a couple of shell scripts to toy with PPP, tell it to turn off 
and turn on and etc.  I create logins in /etc/passwd with no password, 
called "ppp-off" and "ppp-on", so when I want to deactivate ppp, all I 
have to do is switch to an empty VC and type "ppp-off".  They can also be 
run directly from a shell prompt (you must be root).

Attached is a copy of my scripts.  Here are some notes concerning them, 
since my system is probably different than yours and some tailoring will 
be required.

1)	I run a name server.  When I have PPP turned on, I want the name
	server to be able to answer queries for any host on the Internet,
	which requires a valid root nameserver cache file with all of the
	main Internet name servers on it.  When PPP is OFF, I still want
	the name server to be able to answer queries for my own "fake"
	domain, since I have several machines around the house that depend
	on a name server being available, and I don't want them to act
	funny when PPP is off.  So when PPP is off, I install a small
	"fake" root server cache file, that refers all queries back to my
	own name server.  Sorta kludgy, but it works.

2)	If you don't run named, or want to handle it differently, you WILL
	need to edit the /usr/local/sbin/ppp-{off,on} scripts and change the
	named handling stuff.  It's pretty clearly set apart from the rest
	of the scripts, and shouldn't be that hard to manage.

3)	My auto-dialing ppp site is called "netcomd".  Change it to the
	name of your auto-dialing ppp site in the /etc/ppp/ppp.conf file.

4)	My remote PPP server's IP address is 163.179.78.2.  It needs a
	"default" route set to it.  My ppp-on script takes care of this.
	You will have to change this to the default route you need to use.

5)	You can use these shell scripts from a (root) shell prompt, or via
	commands such as sudo, etc.  Or you can add "fake" logins to the
	/etc/passwd file so that you can control PPP from any VC with a
	login prompt.  Use vipw and add the following:

ppp::0:0::0:0:PPP Control login:/:/usr/local/sbin/pppsh
ppp-off::0:0::0:0:Turn PPP off:/:/usr/local/sbin/ppp-off
ppp-on::0:0::0:0:Turn PPP on:/:/usr/local/sbin/ppp-on

	I know, I know, this is in bad form, and is bad for security, etc.
	Since I am a single-user machine at home, security really doesn't
	matter to me.  If you are on a network, you might not want to take
	this approach, or you may want to set passwords on the ppp-* logins.

6)	The "ppp" login and /usr/local/sbin/pppsh command is a easy way to
	control or query a running ppp daemon.  All it does is runs telnet
	to localhost port 3000, but "pppsh" is admittedly easier to type than
	"telnet localhost 3000"

Enjoy...

Donald Burr [d_burr@ix.netcom.com], PO Box 91212, Santa Barbara CA 93190-1212
TEL (805)564-1871 / FAX 564-2315 / WWW http://www.geopages.com/WallStreet/2072
PGP Public Key available by request (send e-mail) or on Public Key Servers.
** Uphold your right to privacy - Use PGP. **

--0-1012909815-823686485=:741
Content-Type: APPLICATION/octet-stream; name="/ppptools.tar.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.3.91.960207014805.741B@starfleet.gov>
Content-Description: 

H4sIAAAAAAAAA+1b63LbuA7uX+spULdztp2JaN0sJem2XbdxWs8mTsZOd3pu
s1Us2tZUljySnDS723c/AHWxbMu5HSfpZoQ2kUSC4CeSAAFQmUVhwwsGtteI
Tl2/M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p6g0R9xn4e43ISVAs+NYlxxI9ePgL5AYdDy
sjqxGsf2GYawfhbFopCQD4LQyY6TKKO2i6VZaAvwc2yfvqHdIrlppVd3ylIZ
OGM8YtSbyMh5XnDOHTolsuEQ5wTX62Bs+yOe9rRFn88EoRtfwL/avSN8DFw/
+VOkADon/fbB/ha4jILqtKslBIef0xslvdKZWIaXPp4Zc38L4vOAOJM+o4VO
6m/f1pNNE+/nc1Pfgoje2BanfCgoiOmwKBm8TI4XBF/ZpuZQwii5TOnUq1Tr
mir90Ea0oooqqqiiiiqqqKKKKqqooooqqugHpv8BffoBDgBQAAA=
--0-1012909815-823686485=:741--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960207013509.741A-101000>