FreeBSD PPPoE setup for UK ISPs

I recently changed ISP from ‘Be’ to ‘Goscomb’ (in order to get native IPv6 delivered direct to my broadband).  My ADSL modem does not support IPv6, so I decided to use it as a bridge to my FreeBSD router which would handle everything for me.

These instructions should work for any UK ISP – and quite probably other non-UK ISPs too.

First of all, you need to configure your ADSL modem to be in fully bridged mode (this varies so much depending on your modem that I can’t really comment here other than to say… read the manual!)  The ATM configuration will be done on your modem, but do not specify any authentication.  As I was using Be,  my modem was already in bridged unauthenticated configuration (all Be multiple-IP customers will be bridged)

Once you have done this, connect your ADSL modem directly into an interface on the FreeBSD router.  Make a note of its interface name (for me, I will use adsl0)

OK, first we need to configure ppp to do the PPPoE authentication.  Edit /etc/ppp/ppp.conf in your favourite editor and add a section for your ISP (I will use goscomb) like so:

goscomb:
set speed sync
set mru 1492
set mtu 1492
set ctsrts off

enable echo
set echoperiod 15
enable lqr
set lqrperiod 15

set log Phase tun

enable ipv6cp
enable ipcp
disable dns

set device PPPoE:adsl0
set server /tmp/pppoe-adsl0 “” 0177

set authname usernamehere@goscomb.net
set authkey passwordhere

add! default HISADDR
add! default HISADDR6

There’s a few things you may wish to change… First you need to replace all occurrences of adsl0 with your interface name.

If your ISP does not support IPv6, you should change enable ipv6cp to disable ipv6cp and remove add! default HISADDR6

Next we need to config the startup sequences… Edit /etc/rc.conf in your favourite editor and add the following:

ifconfig_adsl0=”up”

# PPPoE configuration
ppp_enable=”YES”
ppp_program=”/usr/sbin/ppp”
ppp_nat=”NO”
ppp_user=”root”

ppp_profile=”goscomb”
ppp_goscomb_mode=”ddial”
ppp_goscomb_nat=”NO”

Change the three references to goscomb to be the name of your ppp section.  Also change adsl0 to the name of your PPPoE interface.

If you haven’t already, you need to tell your FreeBSD server to be a router by adding the following into /etc/rc.conf:

gateway_enable=”YES”
ipv6_enable=”YES”
ipv6_gateway_enable=”YES”
ipv6_router_enable=”YES”

Of course, you can just add the first line if you have no IPv6 connectivity.

You should be all set.  Everytime you reboot, your router will auto-connect to the PPPoE (and reconnect if the connection drops).

To confirm after you have connected, you can check out /var/log/ppp.log which should show things being connected.

7 thoughts on “FreeBSD PPPoE setup for UK ISPs

    1. dan Post author

      Sure, usually just load up the u3g.ko module (for usb 3g modems) then use regular ppp to /dev/ttyU0 – haven’t had any problems with it.

      Reply
  1. irwan

    hi dan thank’s for the pppoe tutorial …i’ve try many setting for bsd 7.2 but not works….until i found your setting it’s works good for me…thank’s alot….

    irwan

    -denpasar bali, indonesia-

    Reply
    1. dan Post author

      no problem. I use it myself at home for my dsl (both ipv4+ipv6) with freebsd 8-stable

      Reply
  2. irwan

    hi dan, i’ve problem create freebsd 8.0 as router (not using pppoe dial)….the case like this…..

    1. i’ve server box with 2 nic and 1 external modem:
    nic1 = rl0 -> ip. 192.168.1.100
    nic2 = rl1 -> ip. 192.168.0.254
    modem -> ip. 192.168.1.1

    xp computer client=ip. 192.168.0.10

    modem connect to rl0
    rl1 connect to hub/switch

    2. question is……
    i’ve set :
    defaultrouter=”192.168.1.1″
    gateway_enable=”YES”

    3. i ping google.com from server it’s works
    but from xp client it not work

    any idea ?

    Reply
    1. dan Post author

      The most likely problem will be your router (not the freebsd router). It may not be performing NAT for IPs not within its subnet – so when you ping from the freebsd router it is “on-net” – but from the other subnet behind it, it is not. That would be my first thing to check anyway.

      Reply

Leave a Reply

Your e-mail address will not be published. Required fields are marked *