Red Hat Linux
Setting up a Linux PPP connection with iiNet
Note: These instructions are only valid for a single dialup machine running
Red Hat Linux. If your Linux box makes use of a default route via a network
gateway, please examine the parameters passed to pppd very carefully. A ppp
connection requires ppp to be compiled into the kernel - please refer to the
Linux Kernel HOWTO and the Linux PPP HOWTO in the Other Resources
section below.
There are couple ways to setup your linux machine to the Internet.
Setting up DNS
This step involves setting up your machine to use the iiNet nameserver. Add
the following lines to the file /etc/resolv.conf with a text editor such as
vi or pico:
search iinet.net.au
nameserver 203.0.178.191
Setting up PPP
Before your modem can dial out, you'll need to find out what COM port it's plugged into and make a symbolic link from
/dev/modem -> /dev/ttySx where X is the number of your COM port. COM ports under Linux are numbered from 0, so COM 1
under Windows is /dev/ttyS0, COM 2 under Windows is /dev/ttyS1. For example, if your modem is on /dev/ttyS2, make
a symbolic link like so:
[you@yourmachine /dev]$ln -s /dev/ttyS2 /dev/modem
Please note that iiNet's servers will not allow a CHAP (script) based login. All authentication must be performed by PAP.
First of all, we need to create or modify a PAP secrets file, this is normally in the /etc/ppp/ directory, and it is normally called
pap-secrets. A default /etc/ppp/pap-secrets file looks like:
# Secrets for authentication using PAP
# client server secret IP addresses
USERNAME iinet PASSWORD
and then modify the /etc/ppp/options file to read:
asyncmap 0
crtscts
debug
defaultroute
lock
modem
mru 576
mtu 576
passive
/dev/modem 115200
name iinet
user USERNAME
connect '/usr/sbin/chat -v \
ABORT BUSY \
ABORT "NO CARRIER" \
"" "atINIT" \
OK atdtNUMBER \
CONNECT'
You will need to replace some parts of the above file with your own details. Replace
INIT with the modem initialisation string that you wish to use - consult
Modem Troubleshooting page for suggested initialisation strings to use. Also
replace NUMBER with the iiNet connection number that you wish to use, USERNAME
with your unique iiNet username in lowercase, and PASSWORD with your secret iiNet
password.
Connecting to the Internet
Now that everything has been setup, all you need to do to connect is login as root and type:
To disconnect type:
[you@yourmachine /]$killall pppd
Allowing Non Root users to Dial in
Sometimes it is useful to allow non root users to access the PPPd on your computer,
this is most commonly done where people are using the computer as a workstation
rather than a server, and do not normally dial into the console as root. (A
good security precaution.) Now you have to log in as root to actually make these
changes, so we will assume you are logged is as root from now on.
The first then you need to do to allow non root users to dial is change the
pppd executable to be setuid root. The pppd is usually in /usr/sbin/ so the
command to make it setuid would be:
Now pppd is smart, even though it is setuid, it will not let normal users do some
things, unfortunately sometimes we need to do those things, especially when using
PAP. To get around this, the root user can set up some special files that allow
these privileged commands to run.
These files have to be stored in /etc/ppp/peers/ and they are a copy of the options file, so the best thing to do is copy the
options file into the peers directory, we suggest:
cp /etc/ppp/options /etc/ppp/peers/iinet
Once this is done, normal users can start the connection by typing:
/usr/sbin/pppd call iinet
Another thing that is useful, is creating a .ppprc file in each users home directory, making that file read:
This will mean that the users can start pppd by just typing:
Other Help
Quick Tutorial on using Pine on opera
Shell and SSH - mostly for Windows users, but some shell commands and file
permission information covered
Other Resources
The Linux Kernel HOWTO:
http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html
The Linux PPP HOWTO:
http://www.tldp.org/HOWTO/PPP-HOWTO/index.html
Linux Online
The Linux Homepage at Linux Online contains a wealth of
information about Linux,
as well as the complete collection of Linux HOWTO's:
http://www.linux.org/
Linux Documentation Project
The Linux Documentation Project is home to a collection of
Linux manuals including
the Installation and Getting Started Guide, The Linux User's Guide,
and The Linux Network Administrators' Guide:
http://metalab.unc.edu/LDP/
Red Hat
Red Hat Software (http://www.redhat.com/)
produce a popular Linux distribution which can be purchased on CD or downloaded
directly from ftp.iinet.net.au
|