Installing IPv6 range given by hetzner.

Hi,

I have setup loads of servers with IP v4 addresses in my time but now that I am trying to add the /64 Hetzner have given me for my server I am stumped.

Has anyone done this before?

I would like the addresses allocated automatically to the guests and alos give the host and address out of this range.

I am running Ubuntu 12.04 and I used a minimal install and then the GPL script to install cloudmin.

Thanks

Lance

Status: 
Closed (fixed)

Comments

So you should be able to do this by going to Host Systems -> KVM Host System, and in the "IPv6 address allocation ranges" section entering your v6 range. This will then be used when creating new virtual systems.

For existing systems you can bring up an IPv6 address by going to System Configuration -> Network Interfaces -> eth0, and entering an address from your range in the "IPv6 addresses" table.

Hi Jamie,

I have tried that an it errors out with the following error.

Failed to save IPv6 pools : In row 1 the starting network is 2a01:4f8:190:13a1: but the ending network is 2a01:4f8:190:13a1:ffff:ffff:ffff

so As you can tell I have never worked with ipv6 so I am not even sure I hav e configured my NIC correct;ly

Thanks

Lance

I seem to have been able to add the ipv6 address now.

but it seems I need to figure out how to make my system route the ipv6 and ipv4 addresses

Thanks

Lance

You would need to ask hetzner what the correct default router to use for IPv6 is..

Thanks Guys,

I blew my machine away last night and am starting again.

I just need the order on how I add ip addresses to my server.

DO I add my ipv6 address to the eth0 before running the CM script or do I add it later to the br0 that is created.

So I will try again tonight and see if I can get it working.

Thanks

Lance

You should add it to br0 after installing.

Thanks Jamie

Will give it a go now

Lance

Did you just copy their setup into your br0

or did you create a new br1 for these ip's

I am so confused

Lance

There are two ways you can go :

  1. Use only a single bridge (br0), which isn't connected to eth0. All your VMs are created on that bridge. The host system's IP address is on eth0.

  2. Two bridges, one connected to eth0 (called br0) that is only used by the host system, and another (br1) that isn't connected to eth0 and is used by VMs. The host system's IP address is on br0.

If you installed Cloudmin GPL from our install script, option 2 is easier to setup as you are just adding an extra bridge.

What is the state of your system currently? Can you create virtual systems with IPv4 addresses?

Also how did you partition your HDD's

I have a 3Tb dis which I am splitting into one large VG with 20G / 15G swap 20g /home (I know I don't really need this)

leaving the rest for vmdisks

mounted on /var/vms

Hi jamie,

I have blown it away again to start fresh

At this moment it has just finished running your install script

Lance

Ok here is my current network/interfaces file

addresses removed to protect the innocent

cat /etc/network/interfaces
### Hetzner Online AG - installimage
# Loopback device:
auto lo br0 br1 eth0
iface lo inet loopback

# device: eth0
iface eth0 inet manual
  # default route to access subnet

iface br0 inet static
#main host ip
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
bridge_ports eth0
gateway xxx.xxx.xxx.xxx
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

iface br1 inet static
#additional ipv4
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
pre-up brctl addbr br1
bridge_ports none
bridge_stp off
bridge_fd 0

iface br1 inet6 static
pre-up /sbin/modprobe -q ipv6 ; /bin/true
address xxxx:xxx:xxx:xxx::3
netmask 64
gateway fe80::1

iface br0 inet6 static
pre-up /sbin/modprobe -q ipv6 ; /bin/true
address xxxx:xxx:xxx:xxx::2
netmask 64
gateway fe80::1

That looks OK to me. Is your system working OK and able to create VMs?

Yes I am able to create VM's but the host does not seem to be routing traffic.

I will check that routing is set correctly as I have selected it in webmin but I am not sure it is actually routing.

Lance

this is my sysctl.conf file

net.ipv6.conf.all.accept_ra_rtr_pref=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.default.accept_ra=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv6.conf.default.forwarding=0
net.ipv6.conf.default.accept_ra_defrtr=0
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.default.accept_source_route=0
net.ipv4.ip_forward=1
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.accept_source_route=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.accept_ra_defrtr=0
net.ipv6.conf.all.accept_ra_pinfo=0
net.ipv6.conf.default.accept_ra_pinfo=0
net.ipv6.conf.default.accept_ra_rtr_pref=0

So is ipv4 routing working, or is that broken too?

BTW, I am happy to login to this system to see what is going wrong. Email me at jcameron@virtualmin.com if that is possible... I'd need root access though.

Thanks for the login - I fixed a couple of issues that were prevent IPv4 routing from working :

  1. You didn't have the default gateway set at Host Systems -> KVM Host Settings -> Network Options -> Gateway.
  2. The default gateway for your existing VM wasn't set at System Configuration -> Network Interfaces

It seems OK now that I've made those changes.

For IPv6, no address has been assigned to your VM, so I set one from your IPv6 range - and set the host system as the router. However, pinging external IPv6 addresses like google.com doesn't work.. even on your host system. Are you sure the default IPv6 gateway fe80::1 is correct?

So I was being complete dork.

Apologies for that.

I have checked the e-mail I was sent with my ipv6 request and it is exactly what i sent through to you.

So I will check with them.

Thanks for gettign the ipvr working for me.

Lance

I just got a reply from Hetzner about the wrong gateway IP and they are looking it for me. I suggest that you make a support ticket as well because Gateway: fe80::1 is not correct.

Thanks a million.

I will log a call today

Lance

ok so they said that you can't have a /64 range for 2 bridges.

We need to create a document that set's out step by step how to make a hetzner dedicated server work with cloudmin.

I am super impressed with it and just don't want other people put off by the mahem that is IP.

Is it possible to run Cloudmin with just 1 br device in a routed config?

Lance

Sure, you could just have your primary IP be on eth0, and all your VMs on br0 (or br1).

However, from Hetzner's point of view this wouldn't be any different to what you are doing now. From the outside, you are just using a single bridge either way.

Do they have a doc on the recommended setup for IPv6 and VM hosting?

Which OS and virt platform XEN KVM should I have gone for on my system. Is XEN easier?.

I am just running out of time now and I don't want to have to rebuild all my servers if at a later stage I find out I have borked things up.

Regards

Lance

I realised you guys must be getting really pissed at me with all these questions. Sorry I am just knackered and more out of practice than I thought

I would have gone with debian and xen myself

Have you been abe to get ipv6 working on your system?

you are a better than I am then.

Lance

I think KVM is a better choice for a setup like the one required at Hetzner, as it gives you more control over the bridges.

Thanks Jamie

I still have not been able to get ipv6 to work, They gave me a second ipv6 range just for the host and I have set that up but to no avail.

It is ok for now as I have ipv4 addresses and I will use those until I have a spare moment to get the ipv6 stuff working.

Thanks for everyones help I REALLY appreciate it.

Lance