Wvdial to dial your ISP with a modem

As of 5/2009, Ubuntu and Debian do not automatically support Internet access using a plain modem. (If you have a DSL modem, there should be support and you can skip this document.) You need wvdial. Install it using Synaptic.

Next you need to create a configuration file for it. From a terminal window do

sudo -u root wvdialconf
cp /etc/wvdial.conf ~/.wvdialrc
Edit ~/.wvdialrc and at the end of the file add the lines
Phone = [what number should be dialed, digits only]
Auto Reconnect = off
Password = [your ISP password]
Username = [your ISP username, sometimes equal to your e-mail at the ISP]

You can now dial your ISP from a terminal window using

sudo -u root wvdial
It takes a bit of time to connect after dial.

I find that Firefox does not sense that you are connected in Ubuntu. You must disable "Work offline" in the File/ menu of Firefox each time you start it up. I did not have that problem with Debian.

There is a big security problem with wvdial however. If someone steals your computer, they can read your ISP password simply by booting off a live disk. Or by just taking out your disk and putting it in their USB craddle. That password could then give away other passwords too. The following is what you can do to secure your password. It is assumed that you have a encrypted disk defined as described in the Truecrypt installation, and that it is mounted on /sct. Make sure it is mounted by running Truecrypt and checking! You also need package tcsh installed from Synaptic.

Then in a terminal window, do

mv ~/.wvdial.conf /sct/wvdial.conf
ln -s /sct/wvdial.conf ~/.wvdial.conf
sudo -u root chown [your user name] /etc/ppp/chap-secrets
sudo -u root mv /etc/ppp/chap-secrets /sct
sudo -u root ln -s /sct/chap-secrets /etc/ppp/chap-secrets
mkdir ~/bin
the final command only if you do not yet have a bin folder in your home folder.

In the bin folder, put the script file dial. Edit the file to see what is in there. You will not need sudo if you are logged in as root. Then in a terminal window, do

chmod a+x ~/bin/dial

Now you can dial up by using the command ~/bin/dial in a terminal. Note that you may need to enter both the disk password and your account password: keep them apart. If the disk file is in the header, you disk password is needed.

You may be somewhat mystified by the $1 in the file. I have more than one ISP, so I have files wvdialcf2.conf, wvdialm1redial.conf, wvdialm2.conf, wvdialcs1.conf, wvdialm8.conf, wvdialcs2.conf, wvdialm98.conf, wvdialcf1.conf, wvdialm1.conf on the /sct disk, one for each Internet provider and options. For example, wvdialcf2.conf is the file to dial up the College of Engineering faculty line 2. If I want to dial that number, I use the command ~/bin/dial cf2. Without the cf2, it just dials the same number as last time.


Applies to software obtained May 2009.
Return to Install Packages