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.
-
2How would running dual stack forfeit ipv6?– becomingwisestMar 20, 2011 at 20:58
-
1Running 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 HendersonMar 20, 2011 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?– BittranceMar 20, 2011 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)– leeand00Mar 21, 2011 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.– leeand00Mar 21, 2011 at 15:45
1 Answer
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:
- install radvd on the LAN side of the router.
- setup a 6to4 tunnel to pass your IPv6 traffic over to IPv6 Internet
- 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 ::192.88.99.1 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.