Tuesday, January 1, 2013

ipv6ip / 6in4 tunnels Ubuntu

Add the following to your /etc/network/interfaces file
———–
auto tun0
iface tun0 inet6 v4tunnel
    address <Tunnel IPv6 Address>
    netmask <IPv6 Subnet Mask>
    endpoint <IPv4 Address of Tunnel Server>
    ttl 255
    up ip link set mtu 1480 dev tun0
    up ip route add ::/0 dev tun0
———–
The local tunnel endpoint will be the IPv4 address of the interface facing the Tunnel Server. You may need to reduce the MTU although PMTU happens automatically. You can use tracepath6 ipv6.google.com to find the lowest MTU in your path.
Also make sure you add the following to your IPv4 IPtables rules:
-A INPUT -s <IPv4 Address of Tunnel Server> -i <WAN interface> -j ACCEPT

No comments: