2

I have a couple of tunnels and a subnet from SixXS. One tunnel is for my laptop, the other is for my desktop. On my desktop, I run kvm and have a few guests that I really would like to have IPv6 access.

What is the easiest way to do this?

3 Answers 3

2

The simplest way is to setup radvd to announce your subnet on the local interface. IPv6 capable clients should auto-configure.

Be sure you setup a firewall otherwise your devices will be exposed to the Internet. My article on Implementing IPv6 6to4 should help.

Clients which should not be reachable from the Internet will be slightly more secure if you enable IPv6 privacy which will add new addresses periodically, and remove the old address when it is safe to do so.

For local services IPv6 works well with zero configuration services like Bonjor, avahi, and the like.

4
  • Note that recent releases of Ubuntu enable privacy extensions by default, and according to Wikipedia, Windows and OS X do the same.
    – cqcallaw
    Jul 14, 2012 at 19:21
  • SixXS does not use 6to4, so don't try setting up 6to4. :) Jul 14, 2012 at 19:30
  • How you tunnel doesn't matter for how you setup the firewall and internal network. I started with 6to4 and switched to 6in4. Skip the step on setting up the tunnel and look at the radvd and firewall setup. Those steps are about sharing the tunnel.
    – BillThor
    Jul 14, 2012 at 21:40
  • Using ufw works as an ipv6 firewall both for clients and for routers. But yes, the firewall are important. The privacy extensions doesn't give any security, except that servers can't track clients, like they can do with cookies. The generated global IPv6-address without privacy extensions activated contains the MAC address, which can be used as a trace mechanism in web apps.
    – Anders
    May 16, 2016 at 22:42
1
  1. Set up a network bridge. (While these docs don't mention it, you may also have to disable NetworkManager if you're using it.)

  2. Change your KVM virtual machines to use bridged networking. You can do this from the command line or from the GUI, but the virtual machine must be shut down and then booted for the change to take effect.

  3. Assign a static IPv6 address for your bridge br0 from within the subnet you received from SixXS. Add the following to /etc/network/interfaces (after customizing it):

    interface br0 inet6 static
         address 2001:db8:deca:fbad::1
         netmask 64
    
  4. Configure your Ubuntu box as an IPv6 router.

  5. Reboot.

1
  • And now the package is named gogoc, and can be set up as a router that manage radvd.conf. And if gogoc installs radvd, one don't need to set up static addresses in the client. Just set up the interface as auto instead of static and install rdnssd at the clients. So that clients should get the global prefix, router addresses and DNS servers from radvd (DNS through the package rdnssd).
    – Anders
    May 16, 2016 at 22:35
0

What I ended up doing, was to setup one VM in the virtual network to use as a router. I asked SixXS for a new tunnel for that.

It's really quite simple.

On the VM you use as router

  1. Install aiccu from the repositories.
  2. Install radvd from the repos. It does not include a configuration file, so I used the one below. TUNNEL_PREFIX_FROM_SIXXS.NET can be found in the "Home" page on Sixxs.net next to Tunnel Endpoint which is the address you get on the sixxs-00 interface after running aiccu.
interface eth0 {
    AdvSendAdvert on;
    MaxRtrAdvInterval 30;
    AdvOtherConfigFlag on;

    prefix TUNNEL_PREFIX_FROM_SIXXS.NET {
        AdvOnLink on;
        AdvAutonomous on; 
    };
};
  1. Edit /etc/sysctl.conf and uncomment the line "#net.ipv6.conf.all.forwarding=1" by removing the #. It seems necessary to reboot after this change, though I don't know exactly why.
  2. Then edit your /etc/network/interfaces to setup an IP for your eth0.
# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 static
    address AN_IP_IN_YOUR_SUBNET
    netmask 64

On other clients in the virtual network

Now that the router is up and running, you just need to setup /etc/network/interfaces for the other clients. Give it an IP in the subnet and use the gateway directive to point to the routers eth0 IPv6 address:

# The primary network interface
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 static
    address AN_IP_IN_YOUR_SUBNET
    netmask 64
    gateway ROUTERS_IPV6_ADDRESS

Other things to do

I didn't use DHCPv6 or reverse DNS. You can install and use wide-dhcpv6-server if you want that. It's also likely that you'll want to setup your /etc/hosts to use the IP given to the VMs. There's nothing special about that and the file does include examples.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .