Skip to content

Independent notes on FreeBSD · published since 1999

The FreeBSD 'zine Features, news and community notes for FreeBSD

Issue 6 · July 2000

Reader written notes on FreeBSD, from the command line to the server room.

Open the current issue

February 1999 · Featured article

Userland PPP

Get Connected

So now you want to setup User PPP to get connected to your ISP. I am sorry, but for this issue all I was able to to write about was setting up the PAPorCHAP script. Next issue, I will write up a better one, explaining the whole User PPP setup. Again, I am sorry that I couldn't this issue.

Here I am going to make it as easy as it is going to be for you. The first thing you will have to do is:

(Note: All of this must be done as root)

 $ cd /etc/ppp 

Next, you will have to edit your "ppp.conf" file to setup your script.

 $ ee ppp.conf 

I have setup an example of what the "ppp.conf" file looks like, and gave explainations on what you are going to have to edit and why.

Example ppp.conf

Default settings

 Default setup. Always executed when PPP is invoked. This section is *not* loaded by the 'load' or 'dial' commands. This is the best place to specify your modem device. Example: Com1 = /dev/cuaa0 Example: Com2 = /dev/cuaa1 Example: Com3 = /dev/cuaa2 Example: Com4 = /dev/cuaa3 Logging specification. Logging specs should be done first so that subsequent commands are logged. The rest is all pre set for you. You should leave this alone. 
 default: set log Phase Chat Connect Carrier LCP IPCP CCP tun command set device /dev/cuaa1 set speed 115200 deny lqr set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK AT OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" (The above "dial" line should be all on one line with a space between the " and AT) 

From there you will scroll down to the section where it says PAPorCHAPsite. Here we will set up your script to so you can have a basic connection to your Local ISP.

PAPorCHAP Setup

 If you choose not to use a Unix style Login, you will have to set up a PAPorCHAP script. *Note, the peer suggests whether we should send PAP or CHAP. By default, we send whatever we're asked for.* The First line, "set phone" here you set the phone number that you will dial to connect to your local ISP. The second line is "set login" This is not normally require that you log into the server so, if you are using PAPorCHAP. You must therefore disable your "set login" string. Leave it alone. The next two lines "set authname" and "set authkey" are your username and passwd for the connection to your ISP. Next is "set timeout" which tells your computer how long to wait for a connection to your ISP, if one does not exist within the given time. Example: set timeout 120 (120 seconds, this is setup to run in seconds.) Your Computer will disconnect. "set ifaddr" This is a little tricky, but I will explain as best as possible. My example is "set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0". This is setup for a Dynamic IP. You can also use this for Static IP. That will all be explained. First you have "10.0.0.1/0" This is for your IP, if you set this to a certain IP your computer will not connect unless it is able to have that IP. The "10.0.0.1/0" is for a Dynamic IP. The "/0" bit says that we insist on 0 bits of the specified IP actually being correct, therefore, the other side can assign any IP numbers. Which in simple terms means, it will assign you a Dynamic IP. The "10.0.0.2/0" is for the Gateway IP to your ISP, in my example it is set for a Dynamic Gateway IP. Make sure your ISP does not have a Gateway for you, because if they do then you "must" enter it in here, with out that you will not be able to connect, but if they say they have no Gateway IP for you, then just leave it as is. 
 PAPorCHAPsite: set phone 5555555 set login set authname MyName set authkey MyKey set timeout 120 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 delete ALL add 0 0 HISADDR 

If you have any questions about the PAPorCHAP, or any other sections in the User PPP setup, just e mail me at the address at the top of this article, and I will reply to you as soon as possible.

Greg Munker

On the web

Further reading from the FreeBSD community and the projects named in this article.

Issue contents

Issue 2 · Feb 1999

Window Managers

Pick your Poison

By Daniel Jung

Unlike Microsoft's Windows OS, FreeBSD offers many unique window managers. Starting with a fancy looking Enlightenment to just plain, simple TWM....

Read the article

Issue 2 · Feb 1999

Distributed Computing

Spread the Power

By Joel Sutton

Distributed computing is a somewhat unusual, and in some cases probably a questionable, pastime. But it may, in fact, be one of those cult sports...

Read the article

Issue 2 · Feb 1999

Newbie's Corner

Installing Ports

By Dan Langille

FreeBSD programs FreeBSD has many programs, also known as applications, and are often referred to as ports. Ports are an easy and simple way to...

Read the article