HowTo Set-Up Southwestern Bell's DSL service on FreeBSD
E-Mail Questions to Dean Weimer
General Overview
Expectations / Requirements
The Work
This setup allows you to have your FreeBSD machine proxy the DSL connection to multiple machines, and allows others to connect to your FreeBSD machine from the web. There is more than one way that this may be done, I am making no statements that this is the best way to do it, in fact, this is not. If security is a large concern, you will want to include a firewall.
My DSL line is connected to my FreeBSD Server server via a Kingston KNE111TX (device dc0) NIC (came with SWBell's DSL Service). My FreeBSD Server is then connected to the internal network through a 3Com 3c905 NIC (device xl0).
Here is how it works...
First read the FreeBSD Handbook section on PPPoE. Then if that wasn't clear, look to see what I did.
Also I will assume that you know how to configure, compile and install a new kernel.
In addition you should have enough understanding of PPP to set up PPP on a modem.
** Warning **
There are some known problems with using nat or natd with PPPoE, to avoid most of these make sure that you are running FreeBSD 4.2-STABLE, 4.3-RELEASE, or 4.3-STABLE; if possible install the newest snapshot available.
First as the FreeBSD Handbook directed me, I added options NETGRAPH to my kernel configuration. After recompiling, installing, and rebooting, I created a new section in my /etc/ppp/ppp.conf file. This section is as follows.
SWBELL:
set device PPPoE:dc0 # You need to change dc0 to whatever
# your network device is.
set mru 1492
set mtu 1492
set authname myloginname # Change myloginname to your DSL
# service login name
set authkey mypassword # Change mypassword to your DSL
# Service password
set log Phase tun command
set dial
set login
set ifaddr 10.0.0.1/0 10.0.0.2/0
add default HISADDR
nat enable yes # This line is only needed if using machine for a
# gateway, and not using natd.
Now you are basically set. You just launch ppp as you normally would specifying the profile you created (SWBELL in this example). One change you may want to make is, if you weren't already, when connecting via a modem, you might want to add a section to start ppp in your /etc/rc.conf file. I recomend first running it interactively to verify that the profile is set correctly before doing this next step. This section should look something, or rather exactly like this...
# Start PPP at Start-Up
ppp_enable="YES"
ppp_mode="ddial" # Stay connected, reconnect if dropped
ppp_profile="SWBELL" # Change to the name of your profile
# if not SWBELL
With all this done, your FreeBSD machine should connect to the internet via your DSL connection at bootup, and if configured as a gateway, your internal machines on the network should also see the internet (They must be correctly configured, this doesn't just work on them). It is up to you to make this connection usefull.