How to Hook up PPP in Linux -- Brief How to hook up PPP in Linux in Brief W.G. Unruh There is a text version at ./ppp-linux-brief.txt This is a brief version of the file ./ppp-linux.html--How to Hook up PPP in Linux . This file includes no explanations and is terse. If anythig confuses you read the original longer file. It is the longer file which is more definitive. Note that all of the steps are necessary. There are quite few of them, but skipping steps will probably lead you to grief. Initial Setup As root: Get your modem port-- /dev/ttyS# (#=0,1,...) In /etc/syslog.conf local2.* /var/log/ppp daemon.* /var/log/ppp Run killall -1 syslogd In /etc/resolv.conf nameserver In /etc/host.conf order hosts,bind Run chmod a+r /etc/host.conf /etc/resolv.conf Run route -n If default route (0.0.0.0 as first item), then run route del default and Remove reason for this default route being there. or put that command into /etc/rc.local or /etc/rc.d/rc.local Run ps aux|grep kerneld|grep -v grep If no output (kerneld not running) run /sbin/kerneld and make sure that kerneld is started up at boot time. Run /usr/sbin/pppd If long line of garbage which repeats itself about 10 times Go to next paragraph! if permission denied You are not running as root! if error- ppp may not be in kernel Probably kerneld is not running-- fix Edit /etc/ppp/options and insert the lines lock debug crtscts defaultroute Figuring out how your ISP wants to log you on In a separate window (xterm) tail -f /var/log/ppp Run (all one line) /usr/sbin/pppd /dev/ttyS1 57600 connect " /usr/sbin/chat -v '' AT OK ATD5555555 CONNECT '\d\c'" 5555555=your ISP's phone number. /dev/ttyS1=your modem serial port (ttyS0=COM1,...ttyS3=COM4) Also note difference between a single double quote ", and two successive apostrophes ''. Look at /var/log/ppp (in tail -f window or by less /var/log/ppp If pppd starts to run and gives Problem: all had bit 7 set to 0 Go to Login Authorisation? If one of lines had or Go to PAP/CHAP Login Authorization? Run /usr/sbin/pppd /dev/ttyS1 57600 connect "/usr/sbin/chat -v '' ATD5555555 CONNECT '' ogin assword " In /var/log/ppp If Login:, Password: accepted If pppd started negotiation if Connection made and addresses returned Success--Go to Test if or occur Go To PAP/CHAP else Trouble. Ask in Linux or PPP newsgroups Else Go to Start PPP Else Login: or password not accepted If Login: and Password: occur and your name and password are sent Check your login name or password with your ISP Else If Login: or Password: not asked for Check what is asked for and insert into above command instead of ogin and assword Start ppp Run /usr/sbin/pppd /dev/ttyS1 57600 connect "/usr/sbin/chat -v '' ATD5555555 CONNECT '' ogin assword ppp y" Check /var/log/ppp. If Successful LCP exchange Go up to previous lines. Else If other text ( eg run pppd or PPP? type y) received from remote machine Alter ppp y to reflect what is actually wanted and try again. Else Ask in newsgroups or your ISP. PAP/CHAP If in /var/log/ppp edit /etc/ppp/pap-secrets * * Try Again whichever chat line got you here. If Success Go to Test Else if peer authorisation failure Check username/password with ISP. else other Ask in Newsgroup If where # is a number If #= 05 or md5--you're OK Else if #=80 or 81 Microsoft Chap. If 80 and pppd rejected it (ConfRej), recompile pppd with MSCHAP if 81, complain to ISP about non-standard chap edit /etc/ppp/chap-secrets * * Try again whichever chat script got you here. If Success Go to Test Else if peer authorisation failure Check username and password with ISP else other error Ask in Newsgroup Test Run route -n If Two lines ending in ppp0. One has remote ISP IP number as first, your IP number as second Other line has 0.0.0.0 as first. Sucess Else Are you sure previous things were all done? Run ping If succession of responses-- Success connection working Else May still be OK, but worry. Run ping if succession of responses -- Success Connection working Else if Network not found-- problems-- check number with ISP Run ping www.theory.physics.ubc.ca If succession of responses -- Sucess Name resolver working Else Name Resolver problems-- check with ISP Or, www.theory.physics.ubc.ca has problems-- try other internet names. User use and Automation Run chmod a+rx /usr/sbin/pppd chmod +s /usr/sbin/pppd edit /usr/bin/pppon ============================ #!/bin/sh if [ "$1" = "" ]; then echo Useage: pppon username exit 1 fi pppd /dev/ttyS# 57600 user $1 connect "chat -f $HOME/chatscript" _____________________________ chmod a+rx /usr/sbin/pppon edit $HOME/chatscript ============================== ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "ERROR" ABORT "NO ANSWER" ABORT "BUSY" "" AT OK-\d\d+++\d\d\c-OK ATH0 OK 'AT&F' # and whatever other modem initialisation is needed (some need AT&F0 instead. OK ATD8765432 CONNECT '\c\d' #At this point (after CONNECT) the various chat scipts diverge. #You must enter the expect send pairs which were successful for you #This example is an example of login authorisation. ogin:--ogin: wunruh assword: Dontyouwish _______________________________________________ To stop the connection killall pppd The End