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.
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:
Run kppp (either by clicking the K button at the bottom left of your
screen, or running "kppp &" from the command prompt.
"Satyam", etc).
dial-up, "PAP" for Satyam or VSNL ISDN).
Linux machine as configured by "pcqupdt" will handle all that.
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 ~
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).
between attempts (probably 0).
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.
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.
"Quit on Disconnect". Set pppd timeout to 30 seconds.
define.
#!/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.
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.
chmod +x /etc/ppp/*.local
"/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.
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 connectionIf you want other people on a LAN to
use the same connection, you need to configure a few things:Using pcqupdt from our CD, you’ll probably have already enabled
Internet Gatewaying. If you haven’t, do so now.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.To speed up surfing, make sure that the squid cache on your machine
is enabled, by running the command "ntsysv" and enabling squid.Edit the file /etc/rc.d/init.d/squid, and remove the "#"
mark from the beginning of the line. SQUID_OPTS="-D"Save the file. 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.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.Watch your browsing speed accelerate.
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.