HOME | HOME PORT | EMAIL | SERVICES | SUPPORT | CONTACT US | PRIVACY POLICY
Setting up a PPP connection to:
The Internet Connection
As a start, your kernel must have ppp support, and you must have a pppd that isn't too old. Try to execute the command 'pppd' at a root prompt, you should get a lot of funny characters, not the message "This kernel lacks kernel support". If you get the message, something is wrong ! =)
By the way, the funny characters stops after a short while, just be patient.
Start by creating an empty file named /etc/ppp/options. This can be done by executing :> /etc/ppp/options at a root prompt. Make a symlink named /dev/modem to the com port your modem is placed at, that is /dev/ttyS0 if your modem sits on COM1, /dev/ttyS1 if it's connected to COM2.. Do this by executing # ln -s /dev/ttyS0 /dev/modem . First, make sure the link doesn't exist, your distribution may have done that work at installation.
Save this as /etc/ppp/on
#!/bin/sh # PPP-"ON" script. tmpfile=/tmp/ppp.script.$$ source /etc/ppp/provider export TELEPHONE LOGIN LOGINSTR PASSWORD PASSWORDSTR PPPCOMMANDSTR PPPCOMMAND if test -n "$USEPAP"; then PAP="name $PAPLOGIN remotename $USEPAP" fi umask 0177 cat<<EOF>$tmpfile TIMEOUT 5 ABORT BUSY ABORT "NO DIAL TONE" ABORT \nRINGING\r\n\r\nRINGING\r ABORT "NO CARRIER" "" \r\rATZ OK-+++\c-OK ATH0 TIMEOUT 60 OK ATDT$TELEPHONE CONNECT \n TIMEOUT 40 $LOGINSTR $LOGIN $PASSWORDSTR $PASSWORD $PPPCOMMANDSTR $PPPCOMMAND EOF exec /usr/sbin/pppd -detach debug lock modem crtscts /dev/modem 57600 \ noipdefault netmask 255.255.255.0 defaultroute $PAP \ connect "/usr/sbin/chat -v -f $tmpfile" disconnect "rm -f $tmpfile" & |
Save this as /etc/ppp/off
#!/bin/sh if [ "$1" = "" ]; then DEVICE=ppp0 else DEVICE=$1 fi if [ -r /var/run/$DEVICE.pid ]; then kill -INT `cat /var/run/$DEVICE.pid` if [ ! "$?" = "0" ]; then rm -f /var/run/$DEVICE.pid echo "ERROR: Removed stale pid file" exit 1 fi echo "PPP link to $DEVICE terminated." exit 0 fi echo "ERROR: PPP link is not active on $DEVICE" exit 1 |
If you want to be able to use the internet by typing names (like http://www.intcon.net) instead of numbers (like 206.230.48.4) you have to tell the linux resolver library how to get the information what number correspond to which names. This is done by writing nameserver statements to the file /etc/resolv.conf. Get ip adress of your nameserver from the information your ISP sent you, and write something like this in /etc/resolv.conf
nameserver 206.230.48.4 nameserver 206.230.48.2 nameserver 208.34.44.7 |
Here comes the hard part :-) Now you must give pppd ISP specific settings, writing some words in /etc/ppp/provider and, if the ISP uses PAP or CHAP, a few words in /etc/ppp/pap-secrets or /etc/ppp/chap-secrets respective.
--> Hint: I used "pap-secrets" and it worked fine. <--
Here is a list of the statements you may use, with descriptions.
TELEPHONE=<phonenumber> | The telephone number to your ISP's modem pool. |
LOGINSTR=<login string> | The string that should trigger sending your user name, for example "ogin:--ogin:" works quite well in quite a few cases. PPPD will wait for the string ogin: and then send your account name. |
LOGIN=<account> | Your account name. |
PASSWORDSTR=<password string> | Similar to the LOGINSTR, this tells pppd what to wait for before sending your password. "assword:" will probably work for many systems. |
PASSWORD=<password> | Your password. |
PAPLOGIN=<account> | If your provider uses PAP or CHAP, put your login name here, instead of in the LOGIN keyword. |
USEPAP=<providername> | If your provider uses PAP or CHAP, put the name of your provider here, and put the same name as providername in the secrets file, described later. |
Copy this to your "pap-secrets" file.
# Secrets for authentication using PAP
# client server secret IP addresses
#
My UserName TheInternetConnection
MyPassWord
#
# TELEPHONE=5846137 Telephone Number for The Internet
Connection
# LOGINSTR=ogin:--ogin: Standard Login String
# LOGIN=MyUserName
# PASSWORDSTR=assword: Standard Password String
# PASSWORD=MyPassWord
# USEPAP=
?PAP or CHAP?
If your provider uses PAP or CHAP, a line in the /etc/ppp/pap-secrets, or chap-secrets should be added. It should look like <account> <providername> <password> where account and providername is the same as you put in the /etc/ppp/provider with the PAPLOGIN and USEPAP statements.
/etc/ppp/provider
TELEPHONE=5846137 LOGINSTR=ogin:--ogin: LOGIN=MyAccountName PASSWORDSTR=assword: PASSWORD=MyPassword |
/etc/ppp/provider
TELEPHONE=5846137 PAPLOGIN=MyAccountName USEPAP=ProviderName i.e.:TheInternetConnection |
MyAccountName ProviderName MyPassWord |
HOME | HOME PORT | EMAIL | SERVICES | SUPPORT | CONTACT US | PRIVACY POLICY