我正在尝试通过 Hurricane Electric 的隧道代理服务设置 IPv6 隧道。我使用其示例命令配置了我的系统:
# $ipv4a = tunnel server's IPv4 IP
# $ipv4b = user's IPv4 IP
# $ipv6a = tunnel server's side of point-to-point /64 allocation
# $ipv6b = user's side of point-to-point /64 allocation
ip tunnel add he-ipv6 mode sit remote $ipv4a local $ipv4b ttl 255
ip link set he-ipv6 up
ip addr add $ipv6b dev he-ipv6
ip route add ::/0 dev he-ipv6
并将我的桌面配置为位于 NAT 路由器的 DMZ 中。路由器正在运行 Tomato 固件。
但我无法 ping 任何 IPv6 服务:
$ ping6 -I he-ipv6 '2001:470:1f04:454::1'
PING 2001:470:1f04:454::1(2001:470:1f04:454::1) from 2001:470:1f04:454::2 he-ipv6: 56 data bytes
From 2001:470:1f04:454::2 icmp_seq=1 Destination unreachable: Address unreachable
From 2001:470:1f04:454::2 icmp_seq=2 Destination unreachable: Address unreachable
我能ping 我的本地地址:
$ ping6 -I he-ipv6 '2001:470:1f04:454::2'
PING 2001:470:1f04:454::2(2001:470:1f04:454::2) from 2001:470:1f04:454::2 he-ipv6: 56 data bytes
64 bytes from 2001:470:1f04:454::2: icmp_seq=1 ttl=64 time=0.037 ms
64 bytes from 2001:470:1f04:454::2: icmp_seq=2 ttl=64 time=0.039 ms
我不太了解路由,但我在网上找到的结果建议的输出ip -6 route
可能ip addr
会有用:
$ ip -6 route
2001:470:1f04:454::/64 via :: dev he-ipv6 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
fe80::/64 dev virbr0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev eth1 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 via :: dev he-ipv6 proto kernel metric 256 mtu 1480 advmss 1420 hoplimit 4294967295
default dev he-ipv6 metric 1024 mtu 1480 advmss 1420 hoplimit 4294967295
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/ether 00:1c:c0:a1:98:b2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.10/24 brd 192.168.1.255 scope global eth1
inet6 fe80::21c:c0ff:fea1:98b2/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 36:4c:33:ab:0d:c6 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
inet6 fe80::344c:33ff:feab:dc6/64 scope link
valid_lft forever preferred_lft forever
4: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 00:76:62:6e:65:74 brd ff:ff:ff:ff:ff:ff
5: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 7e:29:5e:7c:ba:93 brd ff:ff:ff:ff:ff:ff
6: sit0: <NOARP> mtu 1480 qdisc noop state DOWN
link/sit 0.0.0.0 brd 0.0.0.0
7: he-ipv6@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN
link/sit 24.130.225.239 peer 72.52.104.74
inet6 2001:470:1f04:454::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::1882:e1ef/128 scope link
valid_lft forever preferred_lft forever
答案1
你检查过你的 ip6tables 吗?我遇到过类似的问题,结果发现我的 ip6tables 全部设置为 drop。
如果您没有运行 ip6 防火墙,您可以像这样清除它们:
ip6tables -P INPUT ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -P FORWARD ACCEPT
请注意,这将完全禁用您的 IPv6 防火墙。