Advertisment

Connecting to the Net

author-image
PCQ Bureau
New Update

A Linux machine running fancy software tools, a nice desktop interface, multimedia software, a variety of mail clients to choose from. What’s missing? A way to connect to the Internet!

Advertisment

This is exactly what we will deal with in this article. Of all the tools available on Linux to connect to the Internet, KPP is the one which can be considered nearest to the Dial-up Networking interface on Windows.

Configure the modem

If you have an external modem, you should not have any issues with using it, though some modems may need special INIT strings which can be found in the modem manual. If you have an internal or a USB modem you might have to first configure it with proper drivers before you can use it. Check

www.linmodems.org  for winmodems and

www.linux-usb.org  for USB modems to see if it works

onLinux.

Advertisment

Configuring KPPP

After you are sure that you have a working modem, fire up KDE, and load up kppp by clicking on the K button and then on the Internet Dialer link in the Internet section. You can run kppp without running KDE by issuing kppp in a command prompt window. If you are working as root, you should see the kppp initial screen, otherwise you would be prompted for the root password.

Kppp can be configured such that some specific users can load it up and dialout without specifying the root password. We’ll look into this a little later.

Advertisment

Let’s first see how kppp can be configured for use.

Click on the “Setup” button. Click on “New...” to create a new account. Kppp will ask you if you want to use the “Wizard mode” or the “Dialog setup”. Select the Dialog Setup as the Wizard mode does not list any Indian ISPs. Feed in the Connection name, phone number and select the type of authentication that the ISP uses. Most ISPs support multiple modes of authentication including PAP, CHAP, and

cleartext.

Check with your respective ISP’s manuals. If you select “script based”, you would have to use the “login script” tag and feed in a pattern of expect/send sequences to automate the username/password feeding process when the remote server offers you a login prompt.

Advertisment

You can specify the DNS server IPs manually in the DNS tab. As such the ppp daemon should automatically pick up the remote DNS servers. If you want to automate some tasks like fetching mail as soon as the connection is established, and killing the mail fetching process when disconnecting, you can specify scripts to be executed Before/After connect or Before/After Disconnect in the Execute tab.

Press OK so that the values are saved and you are put back to the kppp configuration screen. Check the “Device section” so that it reflects the correct modem device. In most cases you can directly use /dev/modem. But if the /dev/modem link does not exist, you can manually specify the port as /dev/cua0 (com1) /dev/cua1 (com2) and so on.

To double check, you can use the query modem button in the modem tab to check if the modem is responding properly. You can customise the commands used to control the modem, like the INIT string and the Dialing type, that is, Tone or Pulse Dialing. Use the Modem Commands button.

Advertisment

Note: If you have an external modem, all you’ll have to do is to check for the correct INIT string so that the modem responds properly. If you have an internal or a USB modem you might have to first configure your modem and then attempt to use it here.

If you are done with this, press OK so that you are taken back to the main KPPP screen where you can specify the username/password and simply press Connect to connect to the Internet. To check whats happening while the connection is being made, enable the “Show Log Window” checkbox on the main KPPP window before pressing “Connect”.

Allowing normal users to use kppp

Advertisment

On a typical Red Hat installation, /usr/bin/kppp is a symbolic link to /usr/bin/consolehelper. The actual kppp binary is /usr/sbin/kppp. This mechanism enables normal users to supply the root password and run programs which need root privileges.

We do not want normal users to know the root password and still be able to use kppp. To do this, you need to do the following.

  1. Add a group called dialout.
  2. Add the specific user accounts to this group.
  3. Do the following:



    chown root.dialout /usr/sbin/kppp


    chmod 4750 /usr/sbin/kppp
  4. Create a file /etc/kppp.allow and put in the users who are in dialout group, one username in a separate line.

The users which you added to the dialout group should now be able to run kppp and connect to the Internet without the root password. The users should run /usr/sbin/kppp instead of

/usr/bin/ kppp.

Vaibhav Sharma is a network consultant with Exocore Consulting

www.exocore.com

Advertisment