-->
Previous Table of Contents Next


Setting up a PPP Connection

Here are the steps you’ll want to follow to establish a PPP connection to an Internet Service Provider, or ISP. In these situations, you’re calling the same phone number and are dynamically allocated an IP address each time you login the ISP’s computer.

First, you’ll need to make sure that your local permissions are set up correctly. When logged in as root, you should edit your /etc/hosts.deny file to add the following line:


     ALL: ALL

This prevents others from logging on your system via the Internet when you’re connected to your ISP. However, you do want to allow yourself access to your own machine (we assume you do, anyway), so edit your /etc/hosts.allow file to add the following line:


     ALL: 127.0.0.1

If you haven’t done so already, you should give your own machine a name (we told how to change this in Chapter 2). This information is found in /etc/HOSTNAME.

Next, you’ll need to tell your Linux system where to find data on the Internet. This involves adding the name of your service provider and a DNS server to the /etc/resolv.conf file, in the following format:


     search mr.net

     nameserver xxx.xxx.xxx.xxx

In this example, we told Linux to look for things like news and mail at mr.net. In the place of xxx.xxx.xxx.xxx you’ll provide a DNS address as provided by your ISP.

You’ll also want to take a look at /etc/hosts. It should contain two lines, looking something like this:


     127.0.0.1 localhost

     0.0.0.0   gilbert

If 127.0.0.1 is used for your machine name, change it. This should not be used when a connection to the Internet is made, because it may conflict with some Internet services.

Finally, you’ll want to give Linux the username and password provided to you by your ISP in the /etc/ppp/pap-secrets file. This line will look something like this:


     reichard * password

where password is the password.

One more step before you make a connection: You’ll need to create a /etc/ppp/chatscript to include information about your ISP, particularly a phone number. The following script works with most modems:


  TIMEOUT 5

  '' ATZ

  OK ATDTxxx-xxxx

  ABORT 'NO CARRIER'

  ABORT BUSY

  ABORT 'NO DIALTONE'

  ABORT WAITING

  TIMEOUT 45

  CONNECT "We are connected!"

  TIMEOUT 5

  "name:" [email protected]

  "word:" password

  in> ppp

where xxx-xxxx is the phone number of your ISP. The final three lines are tailored to our ISP, which presents two prompts (username: and password:) as well as a command line for launching ppp on the host computer. You’ll want to change this for your specific ISP.

Once connected, you should be able to use any of the Internet tools presented here.

Internet Tools

After you work out your connections to the Internet, you can take advantage of the network tools available under Linux.

We’ll begin with a discussion of Internet mail, then we’ll discuss other Internet goodies.

Using Electronic Mail

The ability to send electronic messages to individuals, groups of people, or everyone in the company is not one of the flashiest features of the Linux operating system, but it is certainly one of the most used. Other networking systems, particularly from the MS-DOS world (like Novell NetWare) lack basic electronic-mail (or e-mail) capabilities, while other operating systems featuring built-in electronic mail lack the other extensive capabilities featured in Linux.

The mail program has been an important part of UNIX almost since the very beginning. As UNIX evolved, so has mail—to an extent. The actual electronic-mail mechanisms are similar to the original mail mechanisms; changes mainly concern how a user interacts with a mail program. The procedures described here may not appear exactly the same on your system, as there are many mail programs, both UNIX- and X Window-based, that vary in how they present information to the user.

Linux gives you a few options for reading and sending mail, starting with the mailx command and ending with programs like elm and pine, which ship on the accompanying CD-ROMs.


Previous Table of Contents Next