BSD Dial Setup

BSD Dial Setup

     This document assumes that you are using an external modem connected to a serial port. Do not use an internal or “Winmodem” because these units aren’t real modems. They use software running on the host computer to emulate a modem and that software usually only runs under Windows.  There are a few exceptions.

     This document further assumes that you are running a default kernel or a custom kernel with PPP compiled in. Without PPP, you won’t be able to make a dial-up connection to the Internet.

     For a thorough introduction to running ppp on FreeBSD, see FreeBSD Handbook. On most FreeBSD installs, copies of this document can be found in your “/usr/share/doc” directory.

     As root, edit these configuration files:

  • /etc/resolv.conf
  • /etc/group
  • /etc/ppp/ppp.conf
  • /etc/ppp/ppp.linkup

     Edit /etc/resolv.conf to look like this:

domain eskimo.com
nameserver 204.122.16.8
nameserver 204.122.16.9

     Edit /etc/group and add the users who will be allowed to initiate a PPP dial-up session to the network group.

network:*:alice,bob,carol

     Edit /etc/ppp/ppp.conf. In the demand style configuration template which follows:

  • PPPLOGIN is your PPP account login name
  • PPPPASSWD is your PPP account password
  • DIALNUMBER is your local access number
  • timeout is set to 400 secs of idle
  • only alice, bob are permitted to use ppp
  • /dev/cuaa1 is the modem port

     If PPPLOGIN contains a punctuation like an ‘@’ sign, it must be escaped with a backslash “\” (example: “foo\@eskimo.com”).

default:
  allow users alice bob carol
  set device /dev/cuaa1
  set log Phase Chat LCP IPCP CCP tun command
  set speed 115200
  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 15 \"\" \
      AT&F&C1&D2 OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
  set redial 3 10

demand:
  set phone DIALNUMBER
  set login "TIMEOUT 10 ogin:--ogin: PPPLOGIN word: PPPPASSWD"
  set timeout 400
  set openmode active
  set ifaddr 10.1.1.127/0 10.2.2.127/0 255.255.255.0 0.0.0.0
  add 0 0 10.2.2.127

     Edit /etc/ppp/ppp.linkup to look like this:

demand: # configuration must delete routes first
  delete ALL
  add 0 0 HISADDR
MYADDR: # for non-demand configurations
  add 0 0 HISADDR

     Should you encounter any difficulties, logs are usually kept in /var/log/messages.

     That’s it! You are all set up now. If you are in the network group, you can connect by executing:

/usr/sbin/ppp -auto demand

     To start the ppp daemon automatically when the system boots, add a line like this to your /etc/rc.local file:

su -m ripper -c "ppp -auto -quiet demand"

     (Note: in -auto mode, dialing commences with your first net access.)

Recent Posts