Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jul 1999 22:02:44 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Josef Karthauser <joe@pavilion.net>
Cc:        Brian Somers <brian@Awfulhak.org>, Mark Thomas <thomas@clark.net>, freebsd-current@FreeBSD.org, Wayne Self <wself@cdrom.com>
Subject:   Re: userland ppp - startup 
Message-ID:  <199907072102.WAA19958@dev.lan.awfulhak.org>
In-Reply-To: Your message of "Wed, 07 Jul 1999 10:37:46 BST." <19990707103746.A30024@pavilion.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, Jul 05, 1999 at 08:59:41PM +0100, Brian Somers wrote:
> > [-current cc'd - please don't make this a big thread !]
> > /etc/start_if.tun0 with an ``exec ppp ...''.  This starts things up 
> > at the correct point.
> > 
> > However, maybe it's time for a knob in rc.conf ?  Something like
> > 
> > ppp_enable="NO"         # Start user-ppp
> > ppp_alias="YES"         # Packet aliasing (NAT/masquerading)
> > ppp_mode="auto"         # Usually auto or ddial
> > ppp_profile="papchap"   # Which profile to read from /etc/ppp/ppp.conf
> > 
> > We'd also need a default /etc/ppp/ppp.conf that contains a papchap 
> > profile as this seems to be what most ISPs give you these days.  I'd 
> > also include a commented-out ``set login'' with an appropriate 
> > comment.  Sysinstall may need to be adjusted too...
> > 
> > Suggestions/objections ?  If not, I'll commit soon (unless you want 
> > to do the work Joe ;*)
> 
> Something like this should do it.  It may be nice to also allow the
> authname/authkey to be specified on the command line so that they
> can easily be set in rc.conf, by hand or by sysinstall.

WRT the authname/authkey stuff, with sppp, you do something 
like

spppcontrol isp0 myauthproto=chap myauthname=fred myauthsecret=guess

This is pretty safe as spppcontrol passes the info into the kernel 
and exits.  As this is at startup, we're safe except for the fact 
that everyone's probably going to leave rc.conf readable.

It would be possible to start ppp then use pppctl to set the 
authname and authkey, but this would be a bit of a PITA IMHO as you'd 
have to muck around with ``set server'' etc.

Of course you can ``set title'' in ppp, but that's not entirely safe 
as you can unset it too - restoring the original argv contents.


This aside, I think there are more bits required for the patches :*1

rc.conf.5 needs to be updated - that's the easy bit.

I think we also need a src/etc/ppp/ppp.conf that installs with 0600 
permissions at installation time.  This file would have a default 
and a papchap entry in it - that's where the url for Waynes ppp.conf 
comes in - its contents are probably what we're after.  Older versions 
of src/etc/Makefile installed ppp.conf, so it should be easy to do that 
side of things.

Sysinstall however is also capable of writing ppp.conf.  It would 
need to be smart enough to update the default one with the lines that 
it wants to use (just appending an ``install'' label with the 
necessary bits is probably the best thing to do).  This answers your 
other question..... src/release/sysinstall/network.c - search for 
ppp.conf.  That's how sysinstall does it :-)

Ha, and you thought it'd be straight forward ;^P

> Joe
> -- 
> Josef Karthauser	FreeBSD: How many times have you booted today?
> Technical Manager	Viagra for your server (http://www.uk.freebsd.org)
> Pavilion Internet plc.  [joe@pavilion.net, joe@uk.freebsd.org, joe@tao.org.uk]
[.....]
-- 
Brian <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907072102.WAA19958>