Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a guide somewhere about how to rig up some IPv6-to-IPv4 and IPv4-to-IPv6. I'd like to be able to run a dual stack on my home lan but not forfeit ipv4 just yet.

share|improve this question
How would running dual stack forfeit ipv6? – becomingwisest Mar 20 '11 at 20:58
Running Dual-Stack means exactly that - you're running two stacks of protocols. You will run IPv4 AND IPv6, both at the same time, neither of them being forfeited, and you won't need any IPv6-IPv4 translators, as you'll have them both natively. – Mark Henderson Mar 20 '11 at 21:18
dnsmasq 6-to-4 "translation" should "just work" when dnsmasq is installed on a dual-stack box. What problem do you get? – Bittrance Mar 20 '11 at 22:14
@Christopher Good point. I just meant that I didn't want to get rid of ipv4 yet (which is what a dual stack is for) – leeand00 Mar 21 '11 at 15:44
@Bittrance I don't have any problems yet, I'm just taking a stab in the dark at how to go about setting a dual stack network up (I've never done that before). I've setup ipv4 networks in the past, but never an ipv6 or a dual stack network. – leeand00 Mar 21 '11 at 15:45

If the issue really is to set up an 6-to-4 router, and assuming that you can spare a Linux box as router/bridge, you want to do three things:

  1. install radvd on the LAN side of the router.
  2. setup a 6to4 tunnel to pass your IPv6 traffic over to IPv6 Internet
  3. setup firewall rules for IPv6

#PREFIX# in the below examples is the IPv6 address from the 2002: prefix reserved for legacy addresses, which can be found with "ipv6calc --ipv4_to_6to4addr ".

radvd will do router advertisements on LAN side, telling all IPv6-capable hosts how to configure their IPv6 addresses. A typical radvd.conf may look like this:

interface eth1 {  
   AdvSendAdvert on;
   MinRtrAdvInterval 30;
   MaxRtrAdvInterval 60;

   prefix 0:0:0:1::/64 {
      AdvOnLink on;
      AdvAutonomous on;
      AdvRouterAddr off;
      AdvValidLifetime 86400;
      AdvPreferredLifetime 3600;
      Base6to4Interface eth0;

   RDNSS #PREFIX#:1::1 {
      AdvRDNSSOpen on;

A 6to4 tunnel can be created thus:

ip route add 2000::/3 via :: dev sit0
ip addr  add #PREFIX#:1::1/64 dev eth1

Finally, ip6tables is your friend. The above config assumes that there is a IPv6 capable DNS server on :1::1. dnsmasq should do fine.

Hope this will be enough information to get you googling on the right howtos.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.