Michael Wheeler

IPv6 on FreeBSD 7.2 (Tunnel Broker / HE)

So I moved from Gentoo (awesome distro, on a crappy kernel) to FreeBSD (awesome distro on an awesome kernel). So far I’m loving it. I’ve started to move away from bloated software as well like Openfire and basically anything else that runs on JAVA (eww).

At first IPv6 (tunnel with HE) seemed hard to setup on FreeBSD, I done little bits, but fell into a few pit holes along the way. When I look back it seems so simple.

First problem I found was that IPFW was blocking IPv6 traffic. Simple solution is to do,

00400 allow ip6 from any to any

The other issues I found was examples were a bit misleading in guides as to rc.conf setup. This is what I ended up with.

ipv6_enable=“YES
ipv6_gateway_enable=“YES
ipv6_router_enable=“YES
ipv6_router=“/usr/sbin/route6d”
gif_interfaces=“gif0”
gifconfig_gif0=“218.214.124.179 66.220.18.42”
ipv6_ifconfig_gif0=“2001:470:c:411::2 2001:470:c:411::1 prefixlen 128”
ipv6_defaultrouter=“2001:470:c:411::1”
ipv6_ifconfig_vlan2=“2001:470:d:411::1/64”
rtadvd_enable=“YES

218.214.124.179 was the IP address of where my tunnel came in.
66.220.18.42 is the server IPv4 address.
2001:470:c:411::1 is the server IPv6 address.
2001:470:c:411::2 is the client IPv6 address.
vlan2 is the interface I want IPv6 on.
2001:470:d:411::1 is an address from my routed IPv6 /64

Once you have this, reboot and you should have working IPv6 that announces to your LAN. Surprised me that all the configuration can be done in the one file.

For those interested, here is glasshouse.internaluse.net rc.conf

ateway_enable=“YES
hostname=“glasshouse.internaluse.net”
keymap=“us.iso”
linux_enable=“YES
sshd_enable=“YES
firewall_enable=“YES
firewall_script=“/usr/local/etc/ipfw.rules”
ifconfig_em0=“up”
cloned_interfaces=“vlan2 vlan3”
ifconfig_vlan2=“inet 172.27.2.1 netmask 255.255.255.0 vlan 2 vlandev em0”
ifconfig_vlan3=“inet 172.27.1.2 netmask 255.255.255.0 vlan 3 vlandev em0”
ifconfig_vlan2_alias0=“218.214.200.17 netmask 255.255.255.248”
ppp_enable=“YES
ppp_mode=“ddial”
ppp_profile=“people”
dhcpd_enable=“YES
dhcpd_ifaces=“vlan2”
named_enable=“YES
mysql_enable=“YES
lighttpd_enable=“YES
inetd_enable=“YES
jabberd_enable=“YES
dovecot_enable=“YES
saslauthd_enable=“YES
sendmail_enable=“YES
ntpd_enabled=“YES
apcupsd_enable=“YES
jabber_pymsn_enable=“YES
transmission_enable=“YES
transmission_download_dir=“/mnt/storage/incoming”
samba_enable=“YES
enable_quotas=“YES
check_quotas=“NO”
ircd_ratbox_enable=“YES
ipv6_enable=“YES
ipv6_gateway_enable=“YES
ipv6_router_enable=“YES
ipv6_router=“/usr/sbin/route6d”
gif_interfaces=“gif0”
gifconfig_gif0=“218.214.124.179 66.220.18.42”
ipv6_ifconfig_gif0=“2001:470:c:411::2 2001:470:c:411::1 prefixlen 128”
ipv6_defaultrouter=“2001:470:c:411::1”
ipv6_ifconfig_vlan2=“2001:470:d:411::1/64”
rtadvd_enable=“YES