AzNET Linux PPP QuickstartMost modern Linux distributions (Red Hat, Mandrake, et al), come with graphical Dialer programs which are very easy to configure and use and similar to dialers you may be familiar with such as Windows' Dialup Networking or Apple's Remote Access. To name a few there's rp3 (which comes with Red Hat's Gnome desktop environment) or kppp (which is part of the KDE desktop environment). So if you are using Gnome or KDE, using those graphical programs is recommended; just consult the "help" file which comes with each for a walk-through.
However if you are either not running a graphical environment or just prefer to set things up manually for greater control, it is not difficult and here are instructions on doing so.
NOTE: Linux distributions can be very different from one another and the paths for executables, even common ones, can vary. And each distribution may have its own script for accomplishing a PPP dial up. It's not possible for us to have knowledge about such scripts for all flavors of Linux (Unix, for that matter). Questions regarding such implementations need to go to the Support department of the particular distribution. You may also want to look at the Linux PPP How-To, which can be found at http://www.linuxports.com/howto/ppp/ and other sites on the internet.
These steps have been used successfully to connect to AzNET from various versions of Red Hat, and LFS (Linux From Scratch) distributions, (but should be generic enough for any Linux distribution), with an external serially-connected modem. They are extremely basic but will suffice get you online.
- Make sure you have this information handy:
- Your AzNET dial-up username
- Your dialup password
- A local access number to dial in to AzNET (you should have received this information when you activated your new account, if you need the information please contact us at firstname.lastname@example.org or 800-438-9638).
- Open a terminal window or log in at the console. su to root.
- cd into your /etc directory. Open the "host.conf" file and ensure it looks like this:order hosts, bind multi onEdit the file if needed, save and close the file.
- Open your resolv.conf file to set up your DNS information. If you are in Northern California or the Northwest US edit the file like so:domain AzNET.com nameserver 220.127.116.11 nameserver 18.104.22.168Or, for all other locations including Southern California:domain AzNET.com nameserver 22.214.171.124 nameserver 126.96.36.199Save and close the file.
- Now you need to locate the path to the "pppd" and "chat" programs on your system. This can be done by typing at the command prompt# which pppdand,# which chatMake a note of the paths to those binaries on your system. You should have a modem hooked up to your system. Make a note as to whether it's hooked up to COM1 (in which case the location of the modem is /dev/ttyS0 in linux) or COM2 (which is at /dev/ttyS1), etc. Now you will want to set up your pppd and chat scripts. You can store them wherever you like, but for the purposes of this example we will put them into /etc/ppp/. cd to /etc/ppp/ and open a new file called "chatscript.sh". Edit the file like so (substitute the items in "<..>" with the correct values for your account and your system, and remove the "<" and ">"). If you copy and paste them into your files, copy them from this displayed HTML document, NOT the page source (there are special HTML characters in the source which will cause the scripts not to work). The missing "l" and "p" for "ogin" and "assword" are intentional.#!/bin/sh exec <PATH TO CHAT PROGRAM> -v '' ATZ \ OK ATM0L0 OK <LOCAL ACCESS PHONENUMBER> \ CONNECT '' \ ogin: <YOUR USERNAME> \ assword: <YOUR PASSWORD>save and close the file.
- Now open a new file called "ppp-on" and edit it like so (substitute the items in "<..>" with the correct values for your account and your system):exec <PATH TO PPPD> <LOCATION OF YOUR MODEM> 57600 lock crtscts noipdefault \ defaultroute maxfail 0 mtu 1500 0.0.0.0:0.0.0.0 connect /etc/ppp/chatscript.sh passive debugsave and close the file.
- Now for the final file, ppp-off (this will close down your PPP connection). Open a new file called ppp-off in the same directory, and enter:#!/bin/sh kill -TERM `cat /var/run/ppp0.pid` exit 0
- Make the three scripts executable:# chmod a+x chatscript.sh # chmod a+x ppp-on # chmod a+x ppp-offYou should now have a working internet connection! To dial up, login as root and type "/etc/ppp/ppp-on", and you should hear your modem dialling up and connecting. To disconnect, type "/etc/ppp/ppp-off". If you want to be able to use these scripts as a normal user (without having to su to root), you will need to make the scripts set-user-id root:# chmod u+s chatscript.sh # chmod u+s ppp-on # chmod u+s ppp-offThen you can execute them from your regular user account.