Using IPv6 On Debian Etch
Using IPv6 On Debian Etch
This document describes how you can configure a Debian Etch system for IPv6 so that a) it can connect to other IPv6 hosts and b) other IPv6 hosts can connect to it. IPv6 should become more important in the future as recent estimates assume that there will be no more IPv4 addresses left by 2010 or 2011. Therefore it's time time to learn IPv6.
This document comes without warranty of any kind! I do not issue any guarantee that this will work for you!
1 Preliminary Note
In this tutorial I'm using a Debian server in a LAN (i.e., it uses a router to connect to the Internet) with the ethernet device eth0 and the IPv4 address 192.168.0.100. The router's public IP address at the time of this writing was 126.96.36.199. With IPv6, other systems can connect directly to the Debian system, regardless of the router and NAT. This tutorial will work for Debian systems that are connected directly to the Internet (i.e., no NAT, no router) as well.
To use IPv6, we will configure a tunnel that connects our IPv6 Debian system to IPv6 hardware on the other end (run by a so-called "tunnel broker") and thus to the IPv6 backbone. This tunnel is necessary because most ISPs don't support direct IPv6 connectivity, and it doesn't make sense to route IPv6 traffic over an IPv4 network because chances are that the next-hop router doesn't know what to do with this traffic.
There are multiple tunnel brokers that give you a tunnel and IPv6 addresses for free (e.g. http://tunnelbroker.net/, http://go6.net/4105/freenet.asp, http://www.sixxs.net/). These tunnel brokers are connected to the IPv6 backbone, and the tunnel connects your Debian Etch system to their IPv6 hardware and therefore to the IPv6 backbone.
2 Creating A Tunnel
Register with a tunnel broker - I'm using http://tunnelbroker.net/ as they are very fast - you can be up and running in a few minutes. Then log in on their web interface and create a tunnel ("Create Regular Tunnel" on the http://tunnelbroker.net/ web site). Fill in the IPv4 endpoint (this is the public IPv4 address of your Debian system - if it is behind a router, this is your router's public IPv4 address) and select a location close to you (these are the locations where the tunnel broker has POPs, i.e., connections to the IPv6 backbone):
Afterwards you will see a screen with the details of your tunnel.
These are the details for my test tunnel:
Server IPv4 address: 188.8.131.52
Please write down the Server IPv4 address (184.108.40.206), the Server IPv6 address (2001:0470:1f0a:cc0::1), and the Client IPv6 address (2001:0470:1f0a:cc0::2). We will need them in a moment.
3 Configuring The Debian System
Log in to your Debian system and take a look at the output of
Nothing special here, but the inet6 addr in the output means that the system is IPv6 capable.
Now we configure our new public IPv6 address and the tunnel as follows:
ifconfig sit0 up
That's it already. Take a look at
again, and you should see two new interfaces (sit0 and sit1) that are needed for our tunnel:
Now we can test if we can ping the IPv6 address of the tunnel broker's server:
ping6 -c4 2001:0470:1f0a:cc0::1
server1:~# ping6 -c4 2001:0470:1f0a:cc0::1
--- 2001:0470:1f0a:cc0::1 ping statistics ---
http://www.ipv6.org/v6-www.html has a list of IPv6 hosts. Let's pick one of them and test if we can ping it as well:
ping6 -c4 www.ipv6.uni-muenster.de
server1:~# ping6 -c4 www.ipv6.uni-muenster.de
--- www.ipv6.uni-muenster.de ping statistics ---
Ok, pinging other hosts is working fine. Now let's see if our system can be pinged on our public IPv6 address as well. Go to http://www.berkom.blazing.de/tools/ping.cgi and fill in your public IPv6 address. If all goes well, the output should be similar to this one:
Congratulations, IPv6 is now working on your system!
If you don't want to configure the sit0 and sit1 interfaces manually after each reboot, you can create the file /etc/network/if-up.d/ipv6 as follows:
(Replace the IPv4 and IPv6 addresses with your own values!)
Then make the file executable:
chmod 755 /etc/network/if-up.d/ipv6
Now whenever the system boots, it starts the sit0 and sit1 interfaces automatically.