[ale] Setting up linux PPP Server
Ben Coleman
oloryn at benshome.net
Thu Oct 18 18:30:16 EDT 2001
On Thu, 18 Oct 2001 16:38:45 -0400, Christopher Fowler wrote:
>Do I
>totally have to remove mgetty from the setup and do something totally
>different?
No, mgetty can be set up to automatically start PPP when it recognizes
an LCP configure request (the start of a PPP session). As a matter of
fact, I use this on my own system instead of setting up a pppuser
account (it doesn't require setting pppd to suid root).
To do this, mgetty must have been compiled with -DAUTO_PPP. If your
mgetty hasn't been compiled with this option, you'll have to recompile.
Then you'll need to add an entry for /AutoPPP/ in mgetty's
login.config file (the sample that mgetty installs includes a
commented-out entry for this). Mine looks like
/AutoPPP/ - a_ppp /usr/sbin/pppd call remote
The 'call' option tells pppd to look for additional options (after
processing /etc/ppp/options) in /etc/ppp/peers/remote. In my case, I
also have pppd set up for ADSL (PPPOE) and dial-on-demand PPP (in case
the ADSL line goes out), so I have an empty /etc/ppp/options, and use
separate options files for each pppd use. My /etc/ppp/peers/remote
looks like:
lock
modem
#debug
netmask 255.255.255.252
passive
auth
ms-dns 172.17.113.3
ms-dns 172.17.113.6
mru 1412
mtu 1412
172.17.114.1:172.17.114.2
ipparam remote
The ipparam options adds an extra argument 'remote' when pppd calls
/etc/ppp/ip-up and /etc/ppp/ip-down. I test for this argument in those
scripts in order to add ipchains rules when the dial-up connects, and
remove them when it terminates.
You'll also need to add entries into /etc/ppp/pap-secrets and/or
/etc/ppp/chap-secrets (I have pap-secrets linked to chap-secrets so the
dial-up can use either one), which, from my experience, should include
the ip address for the user. E.g. mine looks something like:
pppuser morannon "<password>" 172.17.114.2
which sets up a 'pppuser' entry, which is assigned 172.17.114.2 when
it dials up. The second argument should be set to the machine name the
modem is located on (the local machine).
Ben
--
Ben Coleman oloryn at benshome.net | The attempt to legislatively
http://oloryn.home.mindspring.com/ | micromanage equality results, at
Amateur Radio NJ8J | best, in equal misery for all.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list