PPP Setup Guide Using PPP-up by Joey
Created on January 14th, 1999.
Last updated on September 27th, 2002.

This guide was originally written in 1999 and was geared for the total linux newbie. Most Linux Distributions will now configure your internet connection upon installation. In case your Linux installation didn't configure your PPP connection, please follow the updated guide below. The guide now assumes you that know the basic linux commands (mount/umount/cp/mv/tar etc). If you are totally new to linux, you might want to visit our New to Linux page before proceeding.

PPP-UP is a simple chatscript to help you get connected to your ISP. I have no clue who wrote this script, all I know is there was no documentation that came with it, so I decided to create one. This script should work on all distributions. I have used it on Slackware 3.3, Red Hat 5.0, 5.1 and 5.2 and 6.0. It's a easy to use and very quick script, so lets install it.

I assume you'll be downloading PPP-UP from a windows machine because if you were connected in Linux, why would you be reading this? :) Once you've download it, save it to a floppy disk and reboot into Linux.

After you've untarred the package, run the installation script by typing the following into a terminal/shell:

./InstallMe

The script will now prompt you for your ISP username followed by your password. Once the installation script has completed it's run you must move all the files into your /etc/ppp directory.

You must now edit a few files using your favorite editor. (I like pico). The first file to edit is called chatscript. In that file, you must enter your ISP's phone number where it says,

   OK             'ATDT555-5555'

You'll obviously wnat to replace the 555-5555 number with the number you use to connect to your ISP. Once done, save the file.

Next up on the to-edit list is your /etc/resolv.conf file. The information in this file tells Linux how to resolve internet names and addresses. You should have received name server information from your ISP, if not give them a call and ask them what name servers you should use.

A typical /etc/resolv.conf file will look something like this:

domain yourisp.com
nameserver 207.107.250.150
nameserver 207.107.250.140

Next up, you'll want to link your modem to the correct com port. A listing of the com ports are as follows.

com 1 is /dev/ttyS0
com 2 is /dev/ttyS1
com 3 is /dev/ttyS2
com 4 is /dev/ttyS3

Now, for example if your modem is on com port 2, you will have to type the following:

ln -s /dev/ttyS1 /dev/modem

If you get an error that /dev/modem already exists, simply remove /dev/modem and rerun the ln -s command.

You'll want to ensure that the ppp-up and ppp-down files are executable. For the chmod-knowledge deprived, you'll have to run the following commands:

chmod 700 ppp-up
chmod 700 ppp-down

Unless you've skipped a step or had errors, you should now be ready to connect your machine to the net. Try it out by running:

./ppp-up | tail -f /var/log/messages

You should hear your modem go Click, attempt to dial your ISP's phone number and if you're lucky you'll hear the world famous modem handshake (that weird noise your modem makes).

If you do in fact get connected you should see something like this:

Jan 11 05:09:35 linuxhelp.ca pppd[357]: Serial connection established.
Jan 11 05:09:35 linuxhelp.ca chat[358]: CONNECT
Jan 11 05:09:35 linuxhelp.ca chat[358]:  -- got it
Jan 11 05:09:35 linuxhelp.ca chat[358]: send (^M)
Jan 11 05:09:36 linuxhelp.ca pppd[357]: Using interface ppp0
Jan 11 05:09:36 linuxhelp.ca pppd[357]: Connect: ppp0 <--> /dev/modem
Jan 11 05:09:46 linuxhelp.ca pppd[357]: Remote message:
Jan 11 05:09:46 linuxhelp.ca pppd[357]: local  IP address 209.5.16.127
Jan 11 05:09:46 linuxhelp.ca pppd[357]: remote IP address 209.5.16.150

If you see something similar to the above you should be connected to the internet. Try visiting your favorite site to see if the connection actually works :)

If you were able to get connected successfully, the next time you attempt to connect to the internet, you do not have to include the | tail -f /var/log/messages bit with the ppp-up command (It is only used for debugging purposes).

Just for reference purposes, to connect to the net type:
/etc/ppp/ppp-up

To disconnect (why would you want to??), type: /etc/ppp/ppp-down

If for some reason everything didn't go very well and you received errors, you probably got some nasty error messages. If you see something like this in your /var/log/messages:

Jan 13 19:34:58 lyte pppd[280]: pppd 2.2.0 started by root, uid 0
Jan 13 19:34:58 lyte pppd[280]: tcgetattr: Input/output error
Jan 13 19:34:58 lyte pppd[280]: Exit.
It means that you have the wrong com port set up for the modem. Go back a few steps and make sure you set it to the correct port.


Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts!