Hurricane Electric's IPv6 Tunnel Broker Forums

General IPv6 Topics => IPv6 on Linux & BSD & Mac => Topic started by: broquea on February 08, 2008, 01:55:38 PM

Title: Configuring a tunnel under *BSD & MacOS X
Post by: broquea on February 08, 2008, 01:55:38 PM
Users will always be able to view the example configurations provided in the tunnelbroker.net interface, however we also wanted to make them available on the forums. I'll cover the ifconfig commands used on the various BSD platforms. I won't be using valid IPv4/IPv6 information in the examples, but the example configurations in the broker's interface will provide the full commands with your relevant account information.

Legend of variables:
$ipv4a = tunnel server's IPv4 IP
$ipv4b = user's IPv4 IP
$ipv6a = tunnel server's side of point-to-point /64 allocation
$ipv6b = user's side of point-to-point /64 allocation

FreeBSD
ifconfig gif0 create
ifconfig gif0 tunnel $ipv4b $ipv4a
ifconfig gif0 inet6 $ipv6b $ipv6a prefixlen 128
route -n add -inet6 default $ipv6a
ifconfig gif0 up
 
OpenBSD
ifconfig gif0 tunnel $ipv4b $ipv4a
ifconfig gif0 inet6 alias $ipv6b $ipv6a prefixlen 128
route -n add -inet6 default $ipv6a

NetBSD & MacOS X
ifconfig gif0 tunnel $ipv4b $ipv4a
ifconfig gif0 inet6 $ipv6b $ipv6a prefixlen /128
route -n add -inet6 default $ipv6a

*NOTE* When behind a firewall appliance that passes protocol41, instead of using the IPv4 endpoint you provided to our broker, use the IPv4 address you get from your appliance's DHCP service.