RedHat 6.2 has two different ways of configuring PPP. One is the old-fashioned method via linuxconf, the other uses a wizard-style interface and the newer RH PPP Dialer. The second is nice for supporting multiple dialups in the same way Windows 98 does, while the first offers somewhat more control for a single dialup. The setup I use here is based off of the first method, however.
This covers two types of PPP setups:
I'll assume you have a standalone machine running, and can log in as root. You should create a regular user account with a username matching your username on XMission. This will simplify things like mail immensely. In this document and various files referred to by it, you should make the following substitutions:
RedHat 6.2 has no major problems with packages that require updating for things to work right. You should still check their update FTP site for newer versions of packages, but nothing will break if you don't. I'm also assuming you're using the Gnome desktop, and including the setup for it's PPP Dialer applet. If you're using KDE, I'm afraid I can't be much help.
Most of the configuration is identical to the 5.x configuration. Welcome to the world of Unix, where major version releases don't typically break lots of things. At this point, you're ready to start. You can use either the quick start using the setup script provided, or proceed to manual setup for either static or dynamic IP addresses
The first thing you need to do is download the template files archive. This contains the setup script and templates for the files that will be needed to configure PPP on your system. Make a directory specifically to hold this archive, save the file to it, then get a root shell prompt, cd to that directory and unpack it using "tar -xvf ppp_files.tar".
Now, run the setup script via "./setup.sh". This script will ask you several questions, then modify the template files and install them into their final places. The questions are:
You will be shown the configuration and asked whether it is correct or not. If you answer "N" here the script will exit without doing anything. If you answer "Y", it will continue to create the configuration files and install them. You should read the testing and notes sections for additional information.
For those of you who want to know exactly what's going on and where things are being put, you can manually edit the template files and install them by hand. I'll outline the files that are needed for all systems, then split into a description of the files specific to regular dial-up accounts with dynamically-assigned IP addresses and the files specific to accounts with static IP addresses. You'll need to download the template files archive and unpack it before starting. Use a temporary directory just for this package so that you don't get the files confused with anything else. Most of the files end in one of three ways, depending on what the file is a template for:
The next thing to do is to tell your resolver how to find things. RedHat has nicely set things up by default to first resolve using the hosts file /etc/hosts and then DNS if the hosts file doesn't contain the name. They've also set up a default hosts file with localhost in it. Take the resolv.conf file from the archive and copy it to /etc using
cp resolv.conf /etc/resolv.conf
chown root:root /etc/resolv.conf
chmod u=rw,go=r /etc/resolv.conf
It's already set up with XMission's DNS servers. If you want, you can check on the most recent ones at XMission's configuration value page but it's unlikely that these are actually going to change in the near future.
Now we edit the PAP secrets file, which is named appropriately enough pap-secrets.tmpl. In your editor, locate the two spots where myusername occurs and replace both of them with your XMission username. The third field on the line, the long pathname beginning with @, is telling the PPP software to find the password, not from the pap-secrets file itself, but from the .pap-xmission file in your regular user account's home directory. Since pap-secrets must be owned by root and unreadable by anyone else, getting the actual password out of this file allows you to change it without having to go root every time. Copy the pap-secrets file into place using
cp pap-secrets.tmpl /etc/ppp/pap-secrets
chown root:root /etc/ppp/pap-secrets
chmod u=rw,go= /etc/ppp/pap-secrets
Now we need to create the file that contains the actual password. First, go to the home directory of your regular user account by
cd /home/myusername
Then use your editor to edit the file .pap-xmission and put your password in it. It should be the only thing in the file, on the first line, with no whitespace before or after it. Set the ownership and permissions with
chown myusername:myusername.pap-xmission
chmod u=rw,go= .pap-xmission
This insures that no other accounts can read it, for security. Obviously I can't tell you what your password is, but XMission has told you what it was initially and you know what you've set it to since then. Just make sure that .pap-xmission contains the same password as you use for shell logins.
Now you need to decide on the number you will call to dial in to XMission. The last set of numbers I have is:
| Area | Phone number |
|---|---|
| Salt Lake City | 801 990-0900 |
| Provo/Orem/Heber | 801 437-0900 |
| Ogden | 801 409-0900 |
| Logan | 435 787-0900 |
| Park City | 435 655-0900 |
| St. George | 435 986-0900 |
| Brigham City | 435 723-9999 |
You can find the latest numbers at XMission's location information page.
Finally, you need to install the scripts that let the Gnome PPP Dialer applet start and stop the dial-up connection. Put these in place by doing:
cp ppp-* /etc/ppp/
chown root:root /etc/ppp/ppp-*
chmod u=rwx,go=rx /etc/ppp/ppp-*
Now you have to make a choice. If you opted to get a static IP address from XMission, proceed to the static IP section and follow the instructions there. If you did not opt for a static IP address, or you aren't sure, continue with the dynamic IP section which will actually work for just about any sort of PPP setup.
Next step is to install the network data script used by the startup scripts. This doesn't have any changes needed to it, so just put it into place using
cp network.dynamic /etc/sysconfig/network
chown root:root /etc/sysconfig/network
chmod u=rw,go=r /etc/sysconfig/network
Now we come to setting up the files that describe the interface. These are ifcfg-ppp0.tmpl for the interface options, chat-ppp0.tmpl for the chat script that does the dialing, and options-ppp0.dynamic that contains options for the PPP daemon program.
Edit ifcfg-ppp0.tmpl. Change the value on the MODEMPORT line to the serial port your modem is on. The first serial port, which DOS would call COM1:, is device /dev/ttyS0. The second serial port is /dev/ttyS1. If you've used Linux before, you might wonder about the change from the cuaX devices you're used to. The cua dial-out devices are going to be obsolete in the 2.2 version of the Linux kernel, and the recommendation is that everyone start referring only to the dial-in ttyS devices. If you continue to use the cua devices, things will start breaking when you upgrade to the Linux 2.2 kernel.
While you are in ifcfg-ppp0.tmpl, also modify the LINESPEED line to the fastest speed your modem and serial port can handle. It is originally set to 115200 bps, which is the highest speed most modern serial ports and modems can deal with. Older equipment might be limited to only 57600. Also replace the occurrence of myusername with your XMission username.
Edit chat-ppp0.tmpl. Locate the line that has ATDT990-0900 on it. This is the SLC dial-up number. Replace the 990-0900 with the local dial-up number for your area from the earlier table of dial-up numbers.
Now edit options-ppp0.dynamic. Find all occurrences of myusername in it and replace them with your XMission username.
Move these three files into place by doing
cp ifcfg-ppp0.tmpl /etc/sysconfig/network-scripts/ifcfg-ppp0
cp chat-ppp0.tmpl /etc/sysconfig/network-scripts/chat-ppp0
cp options-ppp0.dynamic /etc/sysconfig/network-scripts/options-ppp0
chown root:root /etc/sysconfig/network-scripts/*-ppp0
chmod u=rw,go=r /etc/sysconfig/network-scripts/*-ppp0
chmod a+x /etc/sysconfig/network-scripts/ifcfg-ppp0
chmod go= /etc/sysconfig/network-scripts/chat-ppp0
The chat file is made world-non-readable because in theory it can contain passwords or other sensitive information, and the default setup can complain and/or refuse to use it if it's readable. In our configuration it never contains sensitive information, but let's placate the software.
We are now done with the dynamic-IP-specific configuration, and are just about ready to actually try it out. Proceed to the testing section for the trial run.
First we need to modify the hosts file to include your machine name and static IP address. Do a cd /etc and edit the hosts file you find there. You need to add a line to it that looks like
myaddress myusername.users.xmission.com myusername
This will allow your machine to resolve it's own name and address. Replace myaddress and myusername with the appropriate values. When done, cd back to where you have the template files.
Next step is to install the network data script used by the startup scripts. Fire up your editor on network.static and edit it, replacing myusername with your XMission username. Once done with this, install it with
cp network.static /etc/sysconfig/network
chown root:root /etc/sysconfig/network
chmod u=rw,go=r /etc/sysconfig/network
Once this is done, we need to install a dummy interface. This interface will be assigned the static IP address XMission gave you. When the PPP interface is running the dummy interface will get out of the way, but when the PPP connection is down it will provide your machine with your static IP address. This allows you to have a real hostname all the time, and to effectively mimic the setup of a machine with a full-time connection to the Internet. First, go into ifcfg-dummy.static with your editor and replace the myaddress occurrence with the static IP address XMission assigned you. Then move this file into place with
cp ifcfg-dummy.static /etc/sysconfig/network-scripts/ifcfg-dummy
chown root:root /etc/sysconfig/network-scripts/ifcfg-dummy
chmod u=rwx,go=rx /etc/sysconfig/network-scripts/ifcfg-dummy
Now we come to setting up the files that describe the interface. These are ifcfg-ppp0.tmpl for the interface options, chat-ppp0.tmpl for the chat script that does the dialing, and options-ppp0.static that contains options for the PPP daemon program.
Edit ifcfg-ppp0.tmpl. Change the value on the MODEMPORT line to the serial port your modem is on. The first serial port, which DOS would call COM1:, is device /dev/ttyS0. The second serial port is /dev/ttyS1. If you've used Linux before, you might wonder about the change from the cuaX devices you're used to. The cua dial-out devices are going to be obsolete in the 2.2 version of the Linux kernel, and the recommendation is that everyone start referring only to the dial-in ttyS devices. If you continue to use the cua devices, things will start breaking when you upgrade to the Linux 2.2 kernel.
While you are in ifcfg-ppp0.tmpl, also modify the LINESPEED line to the fastest speed your modem and serial port can handle. It is originally set to 115200 bps, which is the highest speed most modern serial ports and modems can deal with. Older equipment might be limited to only 57600. Also replace the occurence of myusername with your XMission username.
Edit chat-ppp0.tmpl. Locate the line that has ATDT990-0900 on it. This is the SLC dial-up number. Replace the 990-0900 with the local dial-up number for your area from the earlier table of dial-up numbers.
Edit options-ppp0.static. Find all occurrences of myusername in it and replace them with your XMission username.
Move these three files into place by doing
cp ifcfg-ppp0.tmpl /etc/sysconfig/network-scripts/ifcfg-ppp0
cp chat-ppp0.tmpl /etc/sysconfig/network-scripts/chat-ppp0
cp options-ppp0.static /etc/sysconfig/network-scripts/options-ppp0
chown root:root /etc/sysconfig/network-scripts/*-ppp0
chmod u=rw,go=r /etc/sysconfig/network-scripts/*-ppp0
chmod a+x /etc/sysconfig/network-scripts/ifcfg-ppp0
chmod go= /etc/sysconfig/network-scripts/chat-ppp0
The chat file is made world-non-readable because in theory it can contain passwords or other sensitive information, and the default setup can complain and/or refuse to use it if it's readable. In our configuration it never contains sensitive information, but let's placate the software.
We are now done with the static-IP-specific configuration, and are just about ready to actually try it out. Proceed to the testing section for the trial run.
Make your message log world-readable with
chmod a+r /var/log/messages
This will let you monitor dial-in progress without needing to be root.
If you have a static IP address, you'll probably want to restart your machine by using
shutdown -r now
This will insure that the dummy network interface is started at boot-time and that everything is reset to the new configuration. This is not needed for dynamic IP address setups since there are no boot-time interfaces involved.
Log out and log back in as myusername, your XMission and regular user account. Try bringing up the dial-up interface with
/sbin/ifup ppp0
tail -f /var/log/messages
If all proceeds as it should, you should get something like this in /var/log/messages:
Aug 1 23:09:50 tknarr ifup-ppp: pppd started for ppp0 on /dev/ttyS0 at 115200 Aug 1 23:09:50 tknarr pppd[17525]: pppd 2.3.3 started by root, uid 0 Aug 1 23:10:07 tknarr pppd[17525]: Serial connection established. Aug 1 23:10:08 tknarr pppd[17525]: Using interface ppp0 Aug 1 23:10:08 tknarr pppd[17525]: Connect: ppp0 <--> /dev/ttyS0 Aug 1 23:10:13 tknarr pppd[17525]: Remote message: Aug 1 23:10:14 tknarr pppd[17525]: local IP address 207.135.128.211 Aug 1 23:10:14 tknarr pppd[17525]: remote IP address 166.70.1.44
This is an actual log from one of my connections. Obviously you will not get the same local IP address, and likely won't get the same remote IP address either. Don't worry, that's what's supposed to happen. If something went wrong, you will either get error messages on your screen after running /sbin/ifup or in /var/log/messages after the PPP software starts up. You can break out of the tail program by Ctrl-C once you see the IP addresses come up.
The most common error you may see is an error from /sbin/ifup saying you aren't allowed to activate, deactivate or control the interface. This usually means you have version 3.66 or earlier of the initscripts package and skipped updating it at the start. Updating it shouldn't wipe out any of the changes we've made thus far, so do that and try bringing up the interface again.
Other errors can indicate problems talking to the modem. Try bringing up the interface again. If the error goes away, we might have to fine-tune the chat script to deal with a strange modem. Get with me directly in this case. Consistent errors every time indicate real problems. In this case, check with me or in the XMission local newsgroups and be prepared with copies of the relevant portion of /var/log/messages and the various files you altered and installed during this exercise.
When you change your XMission password. edit the .pap-xmission file and change the password in it to your new password. It will be used the next time you dial in. Remember to remove any backup files your editor made after you are done. Be aware that it will take a while for a new password to propagate into the dial-in racks, and until that happens your new password won't work for PPP dial-in. The easy way to deal with this if you routinely stay dialed in for an hour or two at a time is to change your password on XMission at the start of a session but only change the local copy in .pap-xmission after you disconnect. If you regularly bounce in and out in short, frequent sessions, the only real way is to change your XMission password but wait until login attempts start to fail before changing the local copy in .pap-xmission.
To start up PPP program and dial into XMission, use
/sbin/ifup ppp0
To shut down the connection and hang up the modem, use
/sbin/ifdown ppp0
If you have a static IP address and lose the modem connection for whatever reason, you can simply ifup the connection again and things will pick up where they left off. If you are getting a dynamic IP address you will not be able to recover from a dropped connection because you'll get a different IP address when you ifup the connection again and none of the IP sockets your programs have open will be valid anymore. Another good reason to spring for a static IP address.
In the Gnome desktop, if you right-click on the taskbar and select "Add applet | Network", you'll see a "PPP dialer" line. It puts a small box on the taskbar with an On/Off label and stop and start buttons. Pushing the start button will bring up the PPP interface, pushing the stop button will shut it down. The text label will reflect which button you last pushed. If the text label is out of sync with the connection, don't worry. Just use the button for what you want to do and it'll work. If you look at the /etc/ppp/ppp-on and /etc/ppp/ppp-off scripts, you'll find they just do /sbin/ifup ppp0 and /sbin/ifdown ppp0 exactly as you would from the keyboard.
There's also a "ModemLights" line on that same menu. This is another dialer applet, with a few additions. First, it recognizes lock files so it can figure out the actual state of the connection and show a lit light if the connection is up, even if the connection was already up when you logged in. It also provides two lights that flash with incoming and outgoing traffic, and a short-term traffic rate graph. Setting this up is fairly easy: just select it and add it to the taskbar, then right-click on it and select "Properties". You need to set up the properties as follows:
tknarr@silverglass.org