Personal tools
You are here: Home ned Productions Ltd News Topics GeoIP

GeoIP

Jun 05, 2010

IPv6 Tunnelling into an IPv4 OpenVZ VPS

by admin — last modified Jun 05, 2010 10:05 PM
Filed Under:

nedproductions.biz has been on IPv6 since its beginning, however its geo-targeting domain name resolution server ns1.nedproductions.biz (i.e. the server which converts names such as www.nedproductions.biz into a unique IP address) was until today queryable in IPv4 only because it runs in a tiny commodity OpenVZ VPS. And unfortunately the host for that VPS doesn't have any IPv6 configured which as it's on OpenVZ means that one cannot configure the usual trick of using an IPv6-over-IPv4 tunnel.

Well I managed to find a workaround, so I'm going to document it here. Firstly as always you need an IPv6 tunnel from www.tunnelbroker.net and then you'll need to do the following as root:

cd /root
apt-get install iproute gcc
wget http://tb-tun.googlecode.com/files/tb-tun_r14.tar.gz
tar zxf  tb-tun_r14.tar.gz
gcc tb_userspace.c -l pthread -o tb_userspace

tb_userspace is a handy little userspace TUN/TAP forwarder program whose author wrote specifically to work around the problem of getting IPv6 into a IPv4 only OpenVZ VPS.

Now to make it go (and assuming you're on Ubuntu/Debian), nano /etc/network/interfaces and append:

iface he-ipv6 inet6 v4tunnel
        endpoint <IPv4 tunnel endpoint>
        address <Your IPv6 address>
        netmask 64
        up      ip route add default dev he-ipv6
        down    ip route del default dev he-ipv6
        mtu     1480

auto tb
iface tb inet6 manual
        pre-up  setsid /root/tb_userspace tb <IPv4 tunnel endpoint> > /dev/null &
        up      ifconfig tb up
        post-up ifconfig tb inet6 add <Your IPv6 address>
        post-up ifconfig tb mtu 1480
        post-up route -A inet6 add ::/0 dev tb
        down    ifconfig tb down
        post-down       route -A inet6 del ::/0 dev tb
        post-down       killall tb_userspace

I have left in the standard he-ipv6 config which tunnelbroker suggests so you can see how the tunnel IPv4 and IPv6 addresses map themselves onto the tb_userspace forwarder. You can safely leave in the he-ipv6 config for the time when your VPS provider does implement IPv6 whereupon you can add an auto he-ipv6 and disable the auto tb.

While this means that everything under your control can now be made IPv6, the last remaining step to making everything IPv6 from start to finish is the addition of IPv6 glue records by your domain registrar. Obviously this is out of your control unless your registrar happens to support IPv6 glue records.

Anyway I hope that was useful. I know it will be for me in the future!

Feb 01, 2010

Added Geo-Direction and Wiki

by admin — last modified Feb 01, 2010 03:25 PM

We finally got around to implementing the geo-directing part of the ned Productions Ltd web services platform, so finally all our hosted websites are now being served to their closest geographical server. This has very substantially improved page load times and browsing speeds for our customers:

LatencyProfile.png

Our server locations are as follows:


View Larger Map

We have also added a new product: you can now have your own sites be geo-directed for a low low price of just €12/year!

We strongly believe in being transparent about how we implement our products and services so you can see for yourself their quality - or indeed, how to implement them yourselves if you so chose. We have hence opened a new Wiki section which contains detailed implementation notes as a public service.