Advertisment

Online with Linux

author-image
PCQ Bureau
New Update

COLOR="#000000" size="2">Connecting to the Internet via

Linux is ridiculously easy. Once you are connected, you can do far more than you could

with any other connection.

Advertisment

For the sake of simplicity, I’ll assume that you have the X

Windowing system running, and have also installed KDE (from the PCQ CD).
COLOR="#ff0000" size="3">

Setting up COLOR="#000000" size="2">

Make sure you are logged in as root,

then do the following:

Advertisment

Run kppp (either by clicking the K button at the bottom left of your

screen, or running "kppp &" from the command prompt.

  1. Click on "Setup".
  2. Click on "New".
  3. Advertisment
  4. Type in a name for the connection (such as, "VSNL",

    "Satyam", etc).
  5. Type in the phone number (such as, 172222).
  6. Select the authentication type ("Script-based" for VSNL

    dial-up, "PAP" for Satyam or VSNL ISDN).
  7. Advertisment
  8. Don’t enter any DNS data–your present DNS setup on your

    Linux machine as configured by "pcqupdt" will handle all that.
  9. If you are using PAP authentication then that’s all you need to

    configure for the account, and you can skip to the next point. If you are using VSNL

    dialup (not ISDN) then you also have to define the login script–click on the tab

    "Login Script", and enter the script as:




    Expect sername:


    ID


    Expect assword:


    Password


    Pause 1


    Send ppp


    Expect ~





  10. Click on OK.
  11. Advertisment
  12. Click on "Device" and set it up for your modem. The

    defaults should be good enough. (Remember that ttyS0 is COM1, and ttyS1 is COM2)



    Modem Device: /dev/ttyS0



    Flow Control: CRTSCTS


    Line Termination: CR/LF


    Connection Speed: 115200





    Enable Lockfile and set the modem timeout to 30

    or 60 seconds (30 is usually enough for tone dialing exchanges).
  13. Click on "Modem".
  14. Make sure that "Modem asserts CD line" is not enabled.
  15. Advertisment
  16. Set "Busy Wait" to the number of seconds you want to wait

    between attempts (probably 0).
  17. Click on Modem Commands, and set your favorite initialization string;

    in most cases "AT&FX1L3S10=200" should be enough. If you have to dial Pulse

    instead of Tone, change the Dial String from ATDT to ATDP. Click on OK.
  18. Now to see if you modem is talking to the serial port, click on Query

    modem, after a few seconds you should see some results, and should also see the send or

    receive lights on your modem flashing. If they don’t (and if DTR doesn’t come

    on) then you have selected the wrong modem port, correct that in the Device setting. If

    the lights flash but you still get an error message, your port speed in Device is probably

    too high, change it to 57600 or lower.
  19. Advertisment
  20. Finally, click on the PPP tab, and enable all settings except

    "Quit on Disconnect". Set pppd timeout to 30 seconds.
  21. Click on OK. Repeat this entire sequence for any other dialup accounts you want to

    define.
  22. Create the file /etc/ppp/ip-up.local, and put the following commands:









    #!/bin/sh



    /usr/bin/killall -9 named


    /usr/sbin/named /etc/named.conf.online


    grep -v pppconnection /etc/hosts >/tmp/hosts.tmp


    echo "$4 pppconnection" >>/tmp/hosts.tmp


    mv /tmp/hosts.tmp /etc/hosts


    ntpdate 128.175.1.3 &> /dev/null &


    wall "Internet connection established ($4)"


    echo `date` CONNECT $4 >> /var/log/ppplog


    Save the file.







  23. Create the file /etc/ppp/ip-down.local, and put the following

    commands:



    #!/bin/sh



    /usr/bin/killall -9 named


    /usr/sbin/named /etc/named.conf


    grep -v pppconnection /etc/hosts >/tmp/hosts.tmp


    mv /tmp/hosts.tmp /etc/hosts


    wall "Internet connection lost"


    echo `date` DISCONNECT >> /var/log/ppplog Save the file.




  24. Make both files executable:



    chmod +x /etc/ppp/*.local
  25. Copy the file "/etc/named.conf" to

    "/etc/named.conf.online". Then edit the file "/etc/named.conf" and

    remove the following 4 lines from it:



    zone "." {


    type hint;


    file "named.ca";


    };


    Save the file.



  26. size="2">Dialing out

    Set "Connect to" to the

    account you want to dial, enable "Show Log Window", and hit the Connect button.
    size="2">

    The system will now start dialing. You can watch the progress in the

    log window. Once you are connected, the Connection window will minimize in the right

    bottom corner. To disconnect, click on the modem icon and choose Disconnect.

    Fire up Netscape if you haven’t used the K>utilities>Menu

    Editor to add Netscape to the menu, just open a terminal window and type "netscape

    &". Point it at www.pcquest.com.

    Voila! Sharing

    the connection

    If you want other people on a LAN to

    use the same connection, you need to configure a few things:

    1. Using pcqupdt from our CD, you’ll probably have already enabled

      Internet Gatewaying. If you haven’t, do so now.
    2. That’s about it. Now all that’s left is to configure your

      Windows and other machines on the LAN to use your system as a gateway. In Windows, go to

      the TCP/IP properties of your LAN card and set the gateway and DNS address to the address

      of your machine. Reboot the machine, and next time you are online they can surf too.
    3. To speed up surfing, make sure that the squid cache on your machine

      is enabled, by running the command "ntsysv" and enabling squid.
    4. Edit the file /etc/rc.d/init.d/squid, and remove the "#"

      mark from the beginning of the line. SQUID_OPTS="-D"
    5. Save the file.
    6. Edit the file /etc/squid.conf and remove "#" from the

      beginning of the line "http_port 3128", and change the value to 8000 instead

      (easier to remember). Save the file.
    7. Start squid (it will automatically start the next time you start the

      machine) with "/etc/rc.d/init.d/squid start"



      Now configure your browser to use the cache, instead of talking to the Internet
      everytime—go to



      View>InternetProperties>Conn- ection>Proxy (in Internet Explorer) or
      Edit>Preferences>Advances> Proxies>Manual>View (Netscape) and set them to

      talk to the IP address of your machine at port 8000.

    8. Watch your browsing speed accelerate.
    9. Note:

      If after connecting to the Internet, you are

      still unable to browse or connect to any server on the Internet, check the file

      /etc/sysconfig/network and remove any references to "Gateway" from it. For this

      session, fix the problem by running "/sbin/route del default". The next time

      your machine boots, this correction will be done automatically.

      Advertisment