Dynamic PPP with IJPPP Under FreeBSD


Step by step instructions for setting up dynamic PPP under FreeBSD the quick and ugly way.

Note, if you're setting up PPP in the 4.0 FreeBSD tree, check my brand new PPP in 4.x Configuration page.

1. cd /etc/ppp

2. cp ppp.linkup.sample ppp.linkup

3. Edit ppp.linkup.

Here is what my ppp.linkup file contains:

aol:
# delete ALL
# add 0 0 HISADDR

These are commented out because I handle this stuff in ppp.conf (see steps 6-7). Note that 'aol:' must correspond to your ISP entry in ppp.conf.

4. cp ppp.conf.sample ppp.conf

5. cp ppp.secret.sample ppp.secret

6. Modify ppp.secret

If you don't have a ppp.secret file, anyone can telnet into port 3000 and play around with your connection and/or your system. This file allows you to set up entries for username/password/ip+netmask which control access.

At the very minimum you need to have this file without editing it so that password control is used for anyone trying to gain access.

The standard ppp.secret file has default usernames, passwords and ip/netmasks. You'll need to change these:

oscar           OurSecretKey    	192.244.184.34/24
BigBird         X4dWg9327       	192.244.184.33/32
tama            localPasswdForControl 

7. Make sure your entry for default: is correct:

Here is mine:

default:
 set device /dev/cuaa1
 set speed 115200
 disable lqr
 deny lqr
 disable pred1
 deny pred1
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"

8. Add an entry for your ISP to the end of /etc/ppp/ppp.conf

Use this entry with modifications for your particular ISP:

aol:
 set device /dev/cuaa1
 set phone YOUR_ISP_PHONE_NUMBER_GOES_HERE
 set login "TIMEOUT 5 login:-\\r-login: YOUR_LOGIN_NAME word: YOUR_PASSWORD"
 set timeout 0
 set ifaddr 0 140.145.1.1/0 255.255.255.0
 set openmode active
 delete ALL
 add 0 0 HISADDR

Note that I use /dev/cuaa1, or com2 for my modem.

Replace the name of the ISP (aol) with your ISP name, then change the entry for 140.145.1.1 to the IP of your ISP's gateway.

9. Modify /etc/rc.local file.

Add this to the end of your /etc/rc.local file:

ppp -auto aol

Note that unless you reboot, you will need to execute this command before your auto PPP will work.

10. Starting PPP.

The easy way - try pinging a host. If your auto is working, it will dial and log you in.

The hard way - From /etc/ppp type:

# ppp aol
User Process PPP. Written by Tosiharu OHNO.
Using Interface: tun0
Interactive Mode
ppp ON spam>

Note that "spam" is my hostname.

11. Dialing your ISP.

Enter "term" and you will get a mini-terminal. dial your ISP using:

atdt123-4567

Or whatever your ISP phone number is. PPP should connect and give you packet mode after a few seconds. If not, type ~p to force packet mode. Once connected, switch to a different virtual terminal with Alt-Fx and ping or telnet to test PPP. The command 'ifconfig -a' will show your network and ip info.

Return to FreeBSD for the Lazy and Hopeless