justlinux.com
Sun, 27-May-2012 11:41:25 GMT

Forum: Registered Users: 76222, Online: 315
nhfs Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home Home

Help File Library: Debian: Internet Connection

Introduction

Ok, we've all been there. At least I for one will admit I have. You get your first Linux installation the way you want it, and then you want to get access to the internet, get your e-mails etc, yet you're not really sure to go about it. The purpose of this document is to give you the information you will need to setup a PPP connection to your ISP in Debian. I based this article on version 2.1 and as much, some earlier releases may not conform to that which is mentioned.

If anyone has any feedback on this document, then please mail me

Note: At this time, the procedures outlined here do not cover the following related, and in many cases essential, topics. However, these are mentioned, and directions to information have been given where possbile.
  • Kernel Configuration for PPP support
  • Modem configuration

Preparation

Believe it or not, this part is often the hardest, but also the most rewarding.

Information

If you have read the pre-installation Help File, you will have noted the information specific to your account with your ISP. If not, the information you will need is listed below.

  • ISP account username:
  • ISP Account password:
  • Phone number:
  • authentication type: eg PAP, CHAP, none Contact your ISP if unsure
  • DNS Servers:
  • POP server:
  • SMTP server:
  • news server:
  • ISP proxy server: if applicable

Commands and Environment

You may also want to read a little about how Linux works, what commands perform what functions, etc. For a more complete references list, see the bottom of this document.

Your Kernel

You hopefully compiled PPP support (PPP is a connection oriented service which you will use to conncet to your ISP) into your kernel when installing. To check, you can type
dmesg | less
to obtain your bootup messages. Scrolling through this list, if you see lines beginning with PPP then you have support compiled into your kernel.

If not, you need to recompile your kernel for PPP support. This is not covered here, but links to information that will help you have been included at the end of the document.

Your Modem

You need to establish the type of modem you have in relation to how/where Linux will use it. If your modem is an external one, the chances are it will be located on a Serial (ttySX) port, where X is a number. ttyS0 = COM1 in dos, ttyS1 = COM2. This document does not cover setting up your modem. There are many obstacles in this field, and many varied ways to achieve this.

You need to make sure you do not have a winmodem (a device that can only be used as a modem by Microsoft OSes, and is not technically a modem at all), as this will stop you from connecting to the world until you get a new modem. You can establish as to whether the modem is a winmodem by consulting the manufacturers, or reading the doumentation mentioned at the end of the documentation. Although this is not strictly true, people in the past have advocated the rule "If its an external modem, its not a winmodem". In reality, if your modem is an external one, your chances are slim of it being a winmodem.

Internal Modems can also provide different obstacles depending on whether they are ISA or PCI.

Configuration

There are a number of ways to configure your system, but I am hopefully going to take you throught the quickest way of getting to the outside world. Other methods of configuration are left to you to find out... learning is fun!

Security

Whole books have been written on this, but a straightforward method of security for the purpose of testing your PPP conenction can be achieved through editing the following files.

  • /etc/hosts.deny
    Open this file with your favorite text editor (Vi is the authors prefered choce)and ensure this line is contained in that file
    ALL: ALL
  • /etc/hosts.allow
    Again, open this file as you did /etc/hosts.deny, and add the following
    ALL: LOCAL

pppconfig

This is where it all starts happening. Get the documentation you collected together earlier for this. The following is given as one step for each screen in the pppconfig utility. This utility will setup everything else you need for your PPP conection.

Make sure you are logged in as root beofre following these steps:

  1. Issue the command
    pppconfig
  2. Select to create a connection
  3. Choose a name for your configuration. The default is "provider". If you use this, it simpliefies your connection command when everything is set up.
  4. Choose your type of connection. PAP is the norm for most dial up accounts w it h ISP's but be sure to check with your ISP on this. If you use CHAP, as k your ISP for the correct hand-shaking script you need.
  5. Delete what text is in this field and replace it with your account's password.
  6. Insert your username. This is different depending on what format your ISP uses. Its usually in the format of name.domain.com/net.
  7. Choose the port your modem is on.
  8. Choose to enamble the default route.
  9. ONLY enter a value other to the default if you have been given a static IP by your ISP.
  10. It is safe to leave modem port speed at the default value.
  11. Again, the default initialisation string "ATZ" should be used unless your modem documentation tells you otherwise.
  12. Enter the phone number of your ISP connection.
  13. If you dont have touch-tone phones, change this setting, otherwise leave it as the default, ATDT tone.
  14. Now you need to write the changes, and you can exit the utility.

You're all done!

The Moment of Truth

I spent so long trying to get my modem working first time, I feel I could almost imitate the noises and sequences myself I know it so well! To test as to whether you have been successful, issue the following command as root
pon

Note: If you changed the connection name in the pppconfig utility to something other than "provider" then you will need to type the following instead.
pon your_connection_name
Your modem should dial, and all should be well. After your modem has finished making noises, try firing up a web browser such as Lynx, or mozilla if you have X already setup.

To disconnect, issue the following command as root:
poff
Or if you changed the connection name from the default,
poff your_connection_name

Summary

The advantages to being on-line with Debian extend beyond that of your e-mail, and web access. Powerful utilities such as 'apt-get' can be fully utilised to provide the user with great optionality in configuring Linux just how you want it. You can only use the pon and poff commands as root, but there are utilities available to get around this if you do not like having to su to root evrytime you want to dial up. Your options on e-mail are also quite substantial. Sendmail, Qmail, mutt, and pine are some you may want to find out more about. But first you can relax a little and surf the web for a while.

Other Information

General information

  • http://www.Debian.org
    This will point you to Debian specific information, should you need it
  • Debian-user@lists.Debian.org
    Subscription to this list is free and open to all. The archives of this can be extremely helpful. If you have a problem, the chances someone else has had it before you...