Setting up IPv6 is Easier Than You Think

Written 14 years ago by Mike Cardwell

IPv6 has been one of those things on my TODO list to learn for a while now. I host several websites and email accounts for people on my own server. I recently migrated to a VPS with a new hosting provider (Linode) so decided to take the opportunity to look into it.

I had not touched IPv6 before so expected there to be a lot of reading, but it turned out to be easy to get set up with pretty limited knowledge. I knew that my hosting provider didn’t offer IPv6 addresses, but I also knew that there are organisations out there who fill this gap by acting as “tunnel brokers”. Basically, they tunnel an IPv6 connection to you over your existing IPv4 connection.

I opened a free account with Hurricane Electric who act as a tunnel broker. The procedure is pretty much as simple as choosing a geographical end-point for the tunnel, and them handing over the network details. Linode and Hurricane Electric seem to have some sort of relationship, so I managed to get a tunnel end-point that was less than 2ms away from my VPS, meaning the tunnel shouldn’t add any noticable latency. They then give you some really simple configuration examples to choose from for various different operating systems. I had my IPv6 address up and running in mere minutes.

Once you have the address up and running, you want to test to make sure it works. The simplest way I found to do this was to visit from the box you have configured. Hurricane Electric also have a tool on their website which will port scan your IPv6 address and show you the results.

Once you’ve done this, you need to configure your various services to accept connections on the new address. Some of them may work over IPv6 by default, but will need restarting. Others will need to have IPv6 explicitly enabled, but that is an application specific procedure. You will also need to set up AAAA records in the DNS. My SMTP service accepts mail on both IPv4 and IPv6, so I set up my DNS as follows:

root@snail:~# host -t mx
mail is handled by 5

root@snail:~# host has address has IPv6 address 2001:470:1f07:85d::beef

Remote hosts which wish to send email to addresses choose either the IPv6 address or the IPv4 address depending on which they support. Hurricane Electrics web interface allows you to set up reverse DNS on your routed allocation also which means you can run a mail service over IPv6 without having to worry about not having FCRDNS.

IPv6 enabling this website was as simple as getting the IP configured up, restarting Apache, and updating the DNS. A few other things of note:

  1. Use “ping6” instead of “ping” when trying to ping an IPv6 address

  2. Use “telnet -6” instead of just “telnet” when trying to connect to an IPv6 address

  3. Use “ip6tables” to create an IPv6 specific set of firewall rules At time of writing, Hurricane Electric reckons there are only 427 days left until we exhaust IPv4… It’s worth spending an afternoon/evening looking into this.

Want to leave a tip?BitcoinMoneroZcashPaypalYou can follow this Blog using RSS. To read more, visit my blog index.