Linux Adventures: Setting up PPP

Getting the Instruction

Red Hat provides a very nice set of instructions on how to set up a PPP connection. The instructions include sample scripts and a copy of the PPP HOW-TO. See Red Hat's PPP-tips here.

I was going to write more stuff on how to set up PPP, but others seem to have done a much better job. Here are two links that contain very detailed instructions:

If you want to avoid using scripts altogether, then try using EzPPP. I started using it and it's great!

The scripts

Here are my scripts. The only thing I had to change was the dialer script. I had to specify full path for chap, in my case it was /usr/sbin/chat.

The other problem was to figure out what to put in the chat script. You have to know what the prompts are that your ISP puts out. In my case the stuff after the modem was connected is like this:

    ost:            ppp                             \
    ogin:--ogin:    $ACCOUNT                        \
    assword:        $PASSWORD			
The left column is what the ISP sends and right is what the chat scripts replies with. The very first prompt my ISP puts out is Host: to which you answer ppp if you want a PPP connection. Then it's Login: and Password:. Note that the entire word doesn't have to be specified, just enough characters to make the chat program know when to send stuff.

If you are not sure what your ISP sends, just use minicom and dial in directly and see.

To debug PPP problems look at the log file found in /var/log/messages.

Routing

One final thing you need to do is to define the name servers so that Netscape etc. can translate names into TCP/IP addresses. Names of the name servers are added to the /etc/resolv.conf. Your ISP should provide you with the TCP/IP addresses.

You also have to define a default router. In Red Hat you can use the "control-panel" program and using the network configuration tool just set the default gateway to be the address of the machine to which you connect (or maybe your ISP will give you an address for the default router).