Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers 3

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.

share|improve this answer
    
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 '12 at 19:21
    
SixXS does not use 6to4, so don't try setting up 6to4. :) –  Michael Hampton Jul 14 '12 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 '12 at 21:40
add comment
  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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.