Home |
Setting up a dialup connection in Slackware |
Back |
Step by step instructions for setting up a dial up connection in a stand alone Slackware
box. I originally wrote this in response to a post on the slackware list at www.linuxquestions.net.
Unless you want to edit the relevant files by hand, you will need to use two
command line tools, netconfig and pppsetup. Brief descriptions of what to do with netconfig and pppsetup follow below, but read the complete text/instructions in each step of the commands. You might
just learn something along the way.
In a consol type "netconfig" and hit enter.
The steps involved are:
- Enter name for host, i.e. the name of your machine, the Slackware default is
"darkstar" if you don't enter anything, I'll use my name "rick".
- Enter domain name, i.e. this would be used to enter the domain name of your
machine, not your ISP's. You can enter anything you like, I use "miles.home".
If this box is on a local area network ( LAN ) its address would now be
rick@miles.home.
- How does the machine connect to the network: since this is a standalone work
station I want "loopback". To select it I down arrow to loopback and hit enter.
- I am then presented with my machine's IP address (internal to my box) and
netmask. These are 127.0.0.1 and 255.255.255.0 respectively. This would be the
same on any standalone linux machine. Your internal IP is your local host so if you were running CUPS and wanted to add a printer, you could type 127.0.0.1:631 in any browser
and access your CUPS server.
I am now finished setting up a loopback network in my box. The next step is to configure
ppp so that I can use my modem to make a dialup connection. I have an internal winmodem with a
Lucent chipset and I have already compiled and installed my drivers (modules) using the ltmodem
package. The command "lsmod" shows me that they are loaded so I can expect the modem to work. If
I was using an external modem I would not have to worry about this.
In a consol I type "pppsetup" and hit enter.
The steps involved are:
- I am first prompted to enter the phone number of my ISP. I must prefix it with the
letters "atd". I enter "atd01985557777"
- Next I am asked to select the location of my modem. I'll use /dev/modem, which points to
/dev/tty0, which would be com port 1 in an MS system.
- Next I am asked to select the baud rate for my modem. I select 115200
because I'm still living in the stone age.
- When asked if my ISP uses "call back" I answer "no" because very few do these
days.
- My modem works fine using the default modem string. In general, most
recently made modems produced for the mass market will.
- I will then be prompted to enter the name of my ISP. I will leave out the
leading "w.w.w" and enter "optusnet.com.au".
- I will then be prompted to enter my ISP's IP address. If I was logged onto
the net I could get this easily enough while connected. Since I'm not I call my
ISP's service desk and ask for the primary and secondary DNS numbers.
I will be told that I don't need them to set up my connection because the cd
they sent me does it all for me. When I say that I use Linux and their CD was useless, the
customer service rep will tell me that Optusnet doesn't support linux and I will tell
tell her/him that Linux will stand up by itself and doesn't need their support, after
which I'll get my DNSs numbers real quick because she/he wants me to go away.
I only need one number for pppsetup so I type in 203.2.75.132.
- I am next asked to nominate which authentication protocol to use. I select
"PAP" because I've done this before, but it's a safe bet and in any case if
itdon't work I can always come backand run pppsetuop again and change it to
CHAP.
- I am asked to enter my login name, This is the name my ISP will be looking
for when it authenticates my attempted connection. It may not necessarily be the
same as the name in my email address. I know what it is and enter it.
- Finally I will be asked to provide my account password which again may or
may not be the same one I use to access my emails once logged in.
That will complete the ppsetup routine after which you should be able to make a
connection using the command " /usr/sbin/ppp-go ". You can disconnect using the
command " /usr/sbin/ppp-off "
Here is the output on my machine when I run ppp-go on the command line. The
connection was made as a normal user with the settings in netconfig and pppsetup that I
discussed above.
| |
rick@rick:~$ /usr/sbin/ppp-go
rick@rick:~$ Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/modem
local IP address 211.29.114.135
remote IP address 211.29.114.254
|
|
Here is the ouput on my machine on the command line.
| |
rick@rick:~$ /usr/sbin/ppp-off
Terminating on signal 2.
Connection terminated.
Connect time 59.7 minutes.
Sent 152525 bytes, received 755714 bytes.
|
|
Note: You will have to run netconfig and pppsetup as root. If you
first test dialing up and connecting as root, disconnect as soon as you know everything
works. Better yet to set up so that you can dial out as a user.
I may be missing something, but in order to set up to run as a user you will have to:
- suid /usr/sbin/ppp-go
- suid /usr/sbin/ppp-off
- suid /usr/sbin/pppd
- suid /usr/sbin/pppoe
- chmod 644 /etc/ppp/options
- chmod 644 /etc/ppp/pppscript
You can also set up a dialup connection using kppp in Slackware . I wrote made up some
notes for newbies on the MLUG list a while
back and I have put them up on this site right here.
I have also written a script called gx-logon that provides a lightweight GUI interface for ppp-go and
ppp--off. GX-logon uses a handy little ap called gxmessage for its GUI frontend. I use gx-logon
on a server so that clients can start/stop a dial up connection as well as on stand alone
machines.