*BSD News Article 64228


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!nntp.coast.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!homer.alpha.net!daily-planet.execpc.com!earth!jkane
From: jkane@earth.execpc.com (Jeff Kane)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: [Q] pppd examples?
Date: 14 Mar 1996 15:49:35 GMT
Organization: Exec-PC
Lines: 85
Message-ID: <4i9f6f$g91@daily-planet.execpc.com>
References: <4i2rui$kqf@daily-planet.execpc.com>
NNTP-Posting-Host: earth-le1.execpc.com
X-Newsreader: TIN [version 1.2 PL2]

I have solved some of my problems.  But still have a couple left.

>I am trying to set up pppd for a small office to use
>for work from home type connections.

> can the ppp0 port and the eth0 ports both
> be part of the same subnet?  ie.

Yes.  I had the same problem with either proxy arp or
routing.  The handbook had a hint in the SLIP section
that wasn't mentioned in the PPP section.
Add - sysctl -w net.inet.ip.forwarding = 1
  except the handbook said to make it 0 (zero) not 1!
  also, setting gateway=YES in /etc/sysconfig does this.

>Third, what is the difference between pap/chap and
> using the /etc/passwd file for login.  Or, simply,
> can one use the /etc/passwd without pap/chap?

This is the one that still has me stumped.

My /etc/ppp/options file is ...
crtscts
netmask 255.255.255.0
192.xx.xx.25:192.xx.xx.26    #  The xx is a real number.
domain xxx.xxxxx.com         #  The x's are real words.
passive
modem
auth                         # Sometimes I remark this
#login                       # Sometimes I remark this
proxyarp
kdebug 1
debug

If I remark "auth", and have client use no login, get in OK.
pppd[3760]: pppd 2.1.2 started by jeff, uid 0
pppd[3761]: Connect: ppp0 <--> /dev/ttyd0
pppd[3761]: local  IP address 192.xx.xx.25
pppd[3761]: remote IP address 192.xx.xx.26

If I use PAP but not require it (remark "auth"), the login fails.  
pppd[3751]: pppd 2.1.2 started by jeff, uid 0
pppd[3752]: Connect: ppp0 <--> /dev/ttyd0
pppd[3752]: No response to PAP authenticate-requests

If I require auth, the login always fails.  
pppd[3722]: pppd 2.1.2 started by jeff, uid 0
pppd[3723]: Connect: ppp0 <--> /dev/ttyd0
pppd[3723]: upap authentication failure for papa
/kernel: ppp0: garbage received: 0xc0 (need 0xFF)
pppd[3723]: Connection terminated.

If I do not specify the "login" and do use the "auth" options in the
/etc/ppp/options file, I get ...
pppd: peer authentication required but no authentication files accessible

my /etc/ppp/pap-secrets file is ...
# * * ""
papa myhost password

If I unremark the first line (* * "") then, I do not get the missing
file message, but I do still fail the authentication process.

If I have also gotten the following message when there is an entry
in the /etc/passwd for the user, but not in the /etc/ppp/pap-secrets ...
pppd[2748]: pppd 2.1.2 started by jeff, uid 0
pppd[2749]: Connect: ppp0 <--> /dev/ttyd0
/kernel: pid 2749: pppd: uid 0: exited on signal 11

If I have an entry in the pap-secrets. But not in the /etc/passwd,
it appears that I get the following message.
pppd[2650]: pppd 2.1.2 started by jeff, uid 0
pppd[2651]: Connect: ppp0 <--> /dev/ttyd0
pppd[2651]: upap login failure for papa
pppd[2651]: Connection terminated.

What should a pap-secrets file look like?  And does it have to have an
entry in the /etc/passwd file that matches it?

--
Jeff Kane                                             jkane@execpc.com 
Sysop - Home Brew University BBS   Brew City Campus       414-238-9074
Genealogy Search:  Brickner, Kane, Kimbro, LaClaire, Snyder|Snider,
                   Seecs|Seetch|Sich, and Thorton.
  Visit my homepage for more ...          http://www.execpc.com/~jkane