Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Can FreeBSD function as a broadband gateway for my DSL connection using PPPOE? by xazax
Posted: 6 Dec 02


First you want to dedicate a computer that you cannot run the latest resource intensive apps on, put two nic cards in it, and install FreeBSD on it. Try to avoid installing Xwindows, its only a router.

Second depepending on the version of FreeBSD that you are running you may need to recompile your kernel to support PPPOE and netgraph.

Third there are the two main files to modify

here is my working sample of /etc/rc.conf
# -- sysinstall generated deltas -- # Fri May 31 01:44:00 2002
# Created: Fri May 31 01:44:00 2002
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="ZUANTIZ.pacbell.net "
ifconfig_ep0="inet  netmask"
ifconfig_ep1="inet  netmask"
    ppp_nat="YES"   # if you want to enable nat for your local network, otherwise NO


  set log Phase Chat LCP IPCP CCP IPCP tun command

  set ifaddr
  set phone 562-549-4848 #may not be neccessary
  set redial 10 4
  set timeout 999
  set device PPPoE:ep0
  set authname xazax666@sbcglobal.net
  set authkey  stnsapp666
  set dial
  set login
  add default HISADDR
  enable dns

If you are confident that you are done make sure that
your first ethernet card in my case (ep0) is connected to your ADSL modem and that your modem is on and connected to the phone line and ready, you may want to give it a complete reset.

Then either run /etc/netstart or reboot your computer when your modem is ready.

This will take several minutes. I use the old tcpdump (that everyone seems to hate nowadays) to view the activity and status of the connection as the proper modem lights are or should be active.

You will see dnsipaddresses -> to your adapter and lines showing your username and password in clear text.  

When you are connected or think you are connected you will see line with an ipaddress from your provider.

At that point you may switch to another terminal login as root and run ifconfig until you see the following output similar to mine.


    inet netmask 0xffffff00 broadcast
    inet6 fe80::2a0:24ff:fe37:9b15%ep0 prefixlen 64 scopeid 0x1
    ether 00:a0:24:37:9b:15
    media: Ethernet 10baseT/UTP

    inet netmask 0xffffff00 broadcast
    inet6 fe80::220:afff:fea4:3184%ep1 prefixlen 64 scopeid 0x2
    ether 00:20:af:a4:31:84
    media: Ethernet 10baseT/UTP

faith0: flags=8000<MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
    inet netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
    inet6 fe80::2a0:24ff:fe37:9b15%tun0 prefixlen 64 scopeid 0x6
    inet --> netmask 0xff000000
    Opened by PID 111
tun1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
    inet6 fe80::2a0:24ff:fe37:9b15%tun1 prefixlen 64 scopeid 0x7

If your tun0 or whatever number has the WAN or Providers ip address. You should be connected to your internet.

To verify the connection then just ping a website

ping yahoo.com
you should see the reply here.

If that is the case:
Go to one of your client machines, make sure that they have an ip address static or dynamic matching the ep1's lan ip address and ping yahoo.com from the command prompt.

If you get a reply, youre done. You are cooler and smarter than your neighbors!!!

If not then review your config, hardware or consult with another source until you are successful or just give up.


Oood Luck...

Back to Linux (server) FAQ Index
Back to Linux (server) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close