Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got problem with 6to4 tunnel on Ubuntu.
My PC's public address is 178.42.231.125, my pivate address is 192.168.100.10 Configuration of tunnel:

ip tunnel add 6to4 mode sit ttl remote any local 178.42.231.125
ip link set dev 6to4 up
ip -6 addr add 2002:b22a:e77d::1/16 dev 6to4 # I used public address to calculate b22a:e77d
ip -6 route add 2000::/3 via ::192.88.99.1 dev 6to4 metric 1

And now I try ping6 ipv6.google.com and destination unreachable

What is wrong?

share|improve this question

3 Answers 3

For 6to4 to work behind NAT, you need to have your NAT:ing router forward all "protocol 41" (6to4) traffic to your Ubuntu computer. Exactly how you set that up will depend on the router.

You also wont be able to have more than one computer speaking 6to4 behind the router, for this reason. But that computer can announce it's 6to4 prefix on the local network and route it to other computers there, if necessary.

You might also want to take note of the fact that a large part of the operator community considers 6to4 broken and wants it to be deprecated and "turned off". You'd probably be better off with a "real" IPv6 tunnel from SiXXS or HE, if you can't get native. When settings up such a tunnel you'll still need to set up proto 41 forwarding in your router.

share|improve this answer
    
+1. More over, if you opt for AYIYA with SIXX you wouldn't need to worry about NAT at all. I was running this configuration for about a year without any problems. –  dtoubelis Jul 16 '11 at 19:24
    
I use ubuntu as router. How to forward 41 protocol? –  lolek198787 Jul 16 '11 at 20:06
    
If you use Ubuntu as your router (the one with the public IP), then you should probably set up 6to4 there instead of on your other PC. –  Jakob Borg Jul 17 '11 at 17:16
    
What do you mean that I should probably set up 6to4 there instead of on your other PC? –  lolek198787 Jul 18 '11 at 17:48
    
I think we are misunderstanding each other. Can you clarify your network layout, preferable with a diagram? –  Jakob Borg Jul 18 '11 at 18:08

OK, never mind about that look here http://imageshack.us/photo/my-images/19/10335694.jpg/. I creat 4 VM with Ubuntu. Two are routeres, two hostes. Hosts try to connect.

Config R1:

ip -4 addr add 1.1.1.1/24 dev eth0

ip tunnel add tun6to4 mode sit ttl 64 remote any local 1.1.1.1 ip link set dev tun6to4 up ip -f inet6 addr add 2002:101:101::1/16 dev tun6to4 ip -f inet6 route add 2002::/16 dev tun6to4 metric 1

echo 1 >/pros/sys/net/ipv4/ip_forward

echo 1 >/pros/sys/net/ipv6/conf/all/forwarding

Config R2:

ip -4 addr add 1.1.1.2/24 dev eth0

ip tunnel add tun6to4 mode sit ttl 64 remote any local 1.1.1.2 ip link set dev tun6to4 up ip -f inet6 addr add 2002:101:102::1/16 dev tun6to4 ip -f inet6 route add 2002::/16 dev tun6to4 metric 1

echo 1 >/pros/sys/net/ipv4/ip_forward

echo 1 >/pros/sys/net/ipv6/conf/all/forwarding

Config A:

ip -6 addr add 2002:101:101::3/48 dev eth0

Config B:

ip -6 addr add 2002:101:102::3/48 dev eth0

I try ping host B on VM with host A and i can't. What may be wrong?

share|improve this answer
    
What do You thinking? –  lolek198787 Jul 28 '11 at 21:43

As the other answers say you have to make a NAT rule of protocol 41 to your Ubuntu. I only want to add that maybe this is not the best idea. There are IPv6 transitions protocolos dessing to work specifically behind a NAT device and give you a routable IPv6 address automatically.

Check out about Teredo and the software Mirendo for your linux.

share|improve this answer

Your Answer

 
discard

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.