With the advent of Windows
7, advanced IPv6 support in Linux and OSX, and the exhaustion of IPv4 addresses, it becomes a matter of urgency to transition to IPv6
networking. This document is a successor to one
I wrote back in 2007 that demonstrated static networking of a single subnet.
Platforms and software for this reference
1. tinc: a mesh-capapble VPN software created in the 2000s. This example should work with any 1.0.x version or later.
2. Quagga: an open-source routing software. Version 0.98 or later is required: version 0.99.x highly suggested!
3. Babel: if you plan on using both IPv6 and IPv4 subnets (for security cameras, gate systems, and legacy industrial equipment).
4. Lower-capacity sites may successfully use routers reprogrammed with OpenWRT: use version 12.09
/ Attitude Adjustment or later. This is also the easiest way to set this up.
5. Higher-capacity or main node sites should use Debian or Ubuntu Linux: latest version of either preferred.
6. IPFire 3.x (still in development as of 2013) appears to have support for IPv6, tinc, and Quagga. Babel support is less certain.
7. ClearOS as a platform works, but you'll need to hunt down the latest RPM files for RHEL or CentOS for tinc/Quagga/Babel; Fedora RPMs don't work with these variants.
If you want to make it easier to administer Linux and Windows systems (as well as not clog up AD with a bunch of temporary addresses), you can force your workstations to not use privacy addresses that are used for accessing external servers.
Windows: as an Administrator, run the following in command prompt...
netsh interface ipv6 set privacy state=disable
Linux: add the following to you /etc/sysctl.conf ...
workstation toolset : includes configuration batch files, copies of stone for 32-bit and x64 Windows, and a 3rd-party LPD for XP.
viewer for IPv6: the original author's website went down in 2010; I have a copy of it.
Getting your networks
For this setup, you will use have two networks: one internal for your administrative needs; and one to access global Internet with.
* Internal network: read up on Unique
Local Addressing, then generate a ULA range using UltraTools,
SixXS, or KAME.
* External network: obtain a /48 or /56 from your main site's ISP, else sign up for tunnel access with Hurricane
Electric or SixXS. If you can get a /64 for each of your sites, adjust the "GLOBAL /48" entries as if they were local.
Table of abbreviations
Any password suitable for the config file in question.
Interface name that will host local subnets: usually "br-lan" on OpenWRT or "eth0" on Debian/Ubuntu.
First 3 parts of a globally-accessible IPv6 range, i.e. "2001:db8:beef".
First 3 parts of an internally-routed IPv6 range.
Name of the site being configured. In tinc, its also used to associate with hostname files.
The octet of the local subnet, i.e. "a" in "2001:db8:beef:a::/64"
1. Login to the router with telnet (if no password was set yet) or SSH. Run the following commands...
2. nano /etc/config/uhttpd : remove comments on the [::] lines.
3. Using the web interface, add an exception for port 655 TCP+UDP to the firewall. Verify the IPv4 and other router settings are accurate for the site.
4. Write the sysctl.conf, and the quagga/tinc/babel configurations as needed (other half of this article). I assume you're using
nano for this.
5. Sign the local tinc host file with tincd -n link -K 6. Add the following to /etc/rc.local as needed...
1. Use an appropriate reference to turn said box into a router (if you haven't already): try to use a newer one.
firewall rules to add
-A INPUT -p tcp -m multiport -j ACCEPT --dports 655
-A INPUT -p udp -m multiport -j ACCEPT --dports 655
2b. If you're using a firewalling script/software, add TCP+UDP port 655 to its config as "allowed".
3. apt-get update && apt-get install tinc quagga babeld 4. Write the sysctl.conf, and the quagga/tinc/babel configurations as needed (other half of this article). I assume you're using
nano for this.
5. Sign the local tinc host file with tincd -n link -K
On the "master" node, it must have a copy of the hostfile from each of the other nodes, plus its own. The nodes only require the master + their own. As for the hostfile, older versions of tinc support a "TCPOnly" flag, and all versions support a compression flag (0 none,1-9 gzip,10-11 zlib).
ip -6 link set vpn6 up mtu 1280
ip link set vpn6 qlen 4096
ip -6 link set vpn6 down
ADDRESS OF MASTER NODE
*tinc-generated SSL key*
*tinc-generated SSL key*
Configuration : Babel
As of April 2013, the Quagga module for Babel remains difficult to use
for this project. As documentation improves, that can be pursued. This
documentation is for the original Babeld server.
The Babel protocol will allow you to route both IPv4 and IPv6 subnets over your tinc VPN. It may also work better than OSPFv3: your mileage may vary.
* On Debian/Ubuntu systems, edit /etc/default/babeld with the local network interface. Debian/Ubuntu boxes can restart Babel with service
babeld restart .
* On OpenWRT routers, add the /etc/restart-babel.sh script. Use the script to restart Babel if needed.
* There are two interface settings for Babel: "wired" and "split-horizon". It tries to detect the appropriate setting automatically, but I find that forcing "wired false" on the tinc interface, better accommodates its nebulous mesh-nature.
* Babel routing relies on specific firewall-style rules to include/exclude networks. You'll need to experiment to find what works for you: an IPv6-only VPN won't require IPv4 filtering rules; an IPv4 route that conflicts with the gateway, will cut the device off.
/etc/restart-babel.sh (chmod a+x)
vpn6 wired false split-horizon true
interface lo split-horizon true wired true
in ip CRITICAL_IPV4_SUBNET eq 16 deny
redistribute ip LOCAL_IPV4_SUBNET/24 eq 24 metric 128
redistribute ip ULA:SUB::/64 eq 64 metric 128
redistribute ip GLOBAL:SUB::/64 eq 64 metric 128
redistribute local deny
Babel users will need the basic routing setup from this; they can skip
OSPFv3 (ospf6d) configuration. There is also a Babel module for Quagga,
but its still being developed and documented.
For this to work, we will be using OSPFv3.
OSPF routers use decimal notation for its purposes, but IPv6
addresses are hexadecimal, so you can either choose to use the same number (delinated as "SUB") for both, or you can use the hexidecimal number of SUB for the IPv6 ranges (example: 0.0.0.11 would represent 2001:db8:beef:b::/64).
* Debian/Ubuntu users will need to edit the /etc/quagga/daemons file.
* If you're using DHCPv6 for DNS (via Dibbler or ISC
DHCP 4.x), you can add ipv6 nd other-config-flag as a command to /etc/quagga/zebra.conf (after the "suppress ra" command). An example setup for DHCPv6 is at the end of this document.
This document supposes the use of Stateless
Autoconfiguration to support IPv6. However, for DNS address distribution, DHCPv6 is still needed. If you have ISC
DHCP version 4 or later installed, you can define a separate IPv6 configuration for DNS assignment.