Subject: Re: dialup server (pppd)
To: Chan Yiu Wah <c5666305@hkstar.com>
From: Miles Nordin <carton@Ivy.NET>
List: current-users
Date: 02/13/2000 17:44:11
On Mon, 14 Feb 2000, Chan Yiu Wah wrote:

> I need the pppd server

You have to be patient and a fairly studly sysadmin to do this well.  I
did it (poorly) myself once.

1. Arrange to have your ``server'' answer the phone.  The slickest way is
   to install and configure mgetty from pkgsrc.  You may be able to get 
   our uugetty(8) to answer the phone--there are even ppp entries in our 
   example gettytab--but mgetty includes far greater complexity, to the
   ends of being better able to understand the strange command language of
   so-called ``smart'' modems.  My prediction is that installing and
   reading about mgetty will save you time.

   This is by far the hardest part.  I hope you bought a modem with lights
   on it!

2. Arrange to have pppd started once the phone is answered.  Either make a
   fake user with pppd as her shell, or better yet have pppd started
   instead of /usr/bin/login.  Some getty's (like ours, for example) are
   capable of automatically starting pppd if they see a ppp handshake.

   If you use pppd as a shell, your client will need a chat(8) script to
   login.  If your getty can start ppp instead of login, then you need
   only use chat for dialing on the client side.

3. Provide the right config files to the server's pppd.  pppd(8) will 
   help.  These are almost exactly the same as the client, except:

   o you must specify the IP address.  there is no keyword for this--you
     just put the local_address:remote_address in the config file

      192.168.0.1:192.168.0.15

     if you are using an IPv6-only network, I think you can skip this
     step, but I'm not sure exactly how pppd must be configured for IPv6.

   o you should set up authentication.  either PAP, maybe based on the
     Unix passwd authentication subsystem, or better yet CHAP based on 
     ppp-specific passwords.

4. Arrange the routing.  If you want to set up one PPP link between two
   LAN's, you should go easy on yourself and use lots of IP address-space.

   o The two LAN's need to be different subnets.
   o The ppp link should have a subnet all to itself.
   o Upstream routers need to know how to get to your LAN B.

       cloud
         |
 LAN A   |  ne0, 192.168.10.22 on 192.168.10.0/24
   +-----+-----+
   | ``server''|
   +-----+-----+
         |  ppp0, 192.168.0.1 on 192.168.0.0/24
   +-----+-----+
   | modem     |
   +-----------+
        ||
        || telephone
        ||
   +-----+-----+
   | modem     |
   +-----------+
         |  ppp0, 192.168.0.2 on 192.168.0.0/24
   +-----+-----+
   | ``client''|
   +-----+-----+ 
  LAN B  |  tlp0, 192.168.11.1 on 192.168.11.0/24

On the [default router]
 192.168.11.0/24 -> 192.168.10.22

On the ``server,''
 192.168.11.0/24 -> 192.168.0.2
 default         -> [default router]

On the ``client,''
 default         -> 192.168.0.1

Use of fewer IP addresses is left as an exercise for the reader.

-- 
Miles Nordin / v:+1 720 841-8308 fax:+1 530 579-8680
555 Bryant Street PMB 182 / Palo Alto, CA 94301-1700 / US