Next Previous Contents

18. Configuring system for Internet

18.1 Configuring Kernel

Before you can logon to the Internet, the kernel must be ppp-aware. You can accomplish this by compiling ppp-support directly into the kernel, or compiling the ppp drivers are modules which you load when you need them. Whatever you prefer, do it now by re-configuring the kernel if necessary. If your LFS kernel is already ppp-aware than you don't have to re-configure the kernel.

18.2 Creating groups and directories

18.3 Installing PPP

18.4 Creating /etc/resolv.conf

# Begin /etc/resolv.conf
 
nameserver <IP address of your ISP's primairy DNS server>
nameserver <IP address of your ISP's secundairy DNS server>
 
# End /etc/resolv.conf
 

18.5 Creating the connect and disconnect scripts

#!/bin/sh
# Begin /usr/bin/pon
 
/usr/sbin/pppd call provider
 
# End /usr/bin/pon
 

#!/bin/sh
# Begin /usr/bin/poff
 
set -- `cat /var/run/ppp*.pid`
 
case $# in
  0)
    kill -15 `ps axw|grep "pppd call [[allnum:]]+"|grep -v grep|awk '{print $1}'`
    exit 0
    ;;
  1)
    kill -15 $1
    exit 0
    ;;
esac
 
# End /usr/bin/poff
 

18.6 Creating /etc/ppp/peers/provider

# Begin /etc/ppp/peers/provider
 
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/provider"
/dev/ttyS1
115200
defaultroute
noipdefault
 
# End /etc/ppp/peers/provider
 

18.7 Creating /etc/chatscripts/provider

# Begin /etc/chatscripts/provider
 
ABORT BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
ABORT "NO ANSWER"
"" ATZ
OK ATDT <ISP's phonenumber>
TIMEOUT 35
CONNECT ''
TIMEOUT 10
ogin: \q<username>
TIMEOUT 10
assword: \q<mysecretpassword>
 
# End /etc/chatscripts/provider
 

18.8 Note on password authentication

As you see from the sample scripts (these are the actual scripts I'm using myself) above I logon to my ISP using this chatscripts in stead of authenticating via pap or chap. Though my ISP supports pap, I choose to do it this slightly different way which has it's disadvantages and advantages. In my case the advantages outweigh the disadvantages. This way I have more control over my logon procedure and I can see closer what is happening when.

For example most times when I connect I have a window running tail -f /var/log/syslog so I can keep an eye on when things like the username and password are sent.

18.9 Other resources

For a far more detailed guide on how to set up Internet, I refer to Egil Kvaleberg's ISP-Hookup-HOWTO which is available from the LDP site at http://www.linuxdoc.org/


Next Previous Contents