I followed the script written down here:
https://wiki.openwrt.org/doc/howto/ipv6.nat6
and it works on my E3000 test environment.
Now I applied exactly the same on the Rpi3, but here I get some warning from the test website:
http://ipv6-test.com/
it says:
Your router or firewall is filtering ICMPv6 messages sent to your computer. An IPv6 host that cannot receive ICMP messages may encounter problems like some web pages loading partially or not at all.
which is right. Google says I'm not using IPv6 at all.
I noticed windows tells me IPv4 and IPv6 have internet connection.
I also noticed some websites indeed work and some not, as written in the warning.
I must point out I can ping -6 google.com and all the other sites I've tried.
So what's wrong with the script for my specific case?
The LAN is on eth1
and the WAN is on eth0
so on eth0 I have "wan" and "wan6" and in the script I use "wan6" to set the ip6tables.
This is the log of the script:
root@OpenWrt:~# logread | grep NAT6
Mon Oct 24 19:14:18 2016 user.notice NAT6: Probing IPv6 route
Mon Oct 24 19:14:19 2016 user.notice NAT6: Setting up NAT6
Mon Oct 24 19:14:19 2016 user.notice NAT6: Added IPv6 masquerading rule to the firewall (Src: dd00:1:1:69::/64 - Dst: eth0)
Mon Oct 24 19:14:19 2016 user.notice NAT6: Added fe80::1 to routing table as gateway on eth0 for outgoing connections
Mon Oct 24 19:14:19 2016 user.notice NAT6: Accepting router advertisements on eth0 even if forwarding is enabled (required for temporary addresses)
Mon Oct 24 19:14:19 2016 user.notice NAT6: Using temporary addresses for outgoing connections on interface eth0
No indication something is wrong. Yet it is.
These are the current settings:
root@OpenWrt:~# ip6tables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all anywhere anywhere ID:66773300
input_rule all anywhere anywhere ID:66773300 /* user chain for input */
ACCEPT all anywhere anywhere ID:66773300 ctstate RELATED,ESTABLISHED
syn_flood tcp anywhere anywhere ID:66773300 tcp flags:FIN,SYN,RST,ACK/SYN
zone_lan_input all anywhere anywhere ID:66773300
zone_wan_input all anywhere anywhere ID:66773300
Chain FORWARD (policy DROP)
target prot opt source destination
forwarding_rule all anywhere anywhere ID:66773300 /* user chain for forwarding */
ACCEPT all anywhere anywhere ID:66773300 ctstate RELATED,ESTABLISHED
zone_lan_forward all anywhere anywhere ID:66773300
zone_wan_forward all anywhere anywhere ID:66773300
reject all anywhere anywhere ID:66773300
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all anywhere anywhere ID:66773300
output_rule all anywhere anywhere ID:66773300 /* user chain for output */
ACCEPT all anywhere anywhere ID:66773300 ctstate RELATED,ESTABLISHED
zone_lan_output all anywhere anywhere ID:66773300
zone_wan_output all anywhere anywhere ID:66773300
Chain forwarding_lan_rule (1 references)
target prot opt source destination
Chain forwarding_rule (1 references)
target prot opt source destination
Chain forwarding_wan_rule (1 references)
target prot opt source destination
Chain input_lan_rule (1 references)
target prot opt source destination
Chain input_rule (1 references)
target prot opt source destination
Chain input_wan_rule (1 references)
target prot opt source destination
Chain output_lan_rule (1 references)
target prot opt source destination
Chain output_rule (1 references)
target prot opt source destination
Chain output_wan_rule (1 references)
target prot opt source destination
Chain reject (3 references)
target prot opt source destination
REJECT tcp anywhere anywhere ID:66773300 reject-with tcp-reset
REJECT all anywhere anywhere ID:66773300 reject-with icmp6-port-unreachable
Chain syn_flood (1 references)
target prot opt source destination
RETURN tcp anywhere anywhere ID:66773300 tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
DROP all anywhere anywhere ID:66773300
Chain zone_lan_dest_ACCEPT (4 references)
target prot opt source destination
ACCEPT all anywhere anywhere ID:66773300
Chain zone_lan_forward (1 references)
target prot opt source destination
forwarding_lan_rule all anywhere anywhere ID:66773300 /* user chain for forwarding */
zone_wan_dest_ACCEPT all anywhere anywhere ID:66773300 /* forwarding lan -> wan */
zone_lan_dest_ACCEPT all anywhere anywhere ID:66773300
Chain zone_lan_input (1 references)
target prot opt source destination
input_lan_rule all anywhere anywhere ID:66773300 /* user chain for input */
zone_lan_src_ACCEPT all anywhere anywhere ID:66773300
Chain zone_lan_output (1 references)
target prot opt source destination
output_lan_rule all anywhere anywhere ID:66773300 /* user chain for output */
zone_lan_dest_ACCEPT all anywhere anywhere ID:66773300
Chain zone_lan_src_ACCEPT (1 references)
target prot opt source destination
ACCEPT all anywhere anywhere ID:66773300
Chain zone_wan_dest_ACCEPT (2 references)
target prot opt source destination
ACCEPT all anywhere anywhere ID:66773300
Chain zone_wan_dest_REJECT (1 references)
target prot opt source destination
reject all anywhere anywhere ID:66773300
Chain zone_wan_forward (1 references)
target prot opt source destination
forwarding_wan_rule all anywhere anywhere ID:66773300 /* user chain for forwarding */
zone_lan_dest_ACCEPT esp anywhere anywhere ID:66773300 /* @rule[6] */
zone_lan_dest_ACCEPT udp anywhere anywhere ID:66773300 udp dpt:isakmp /* @rule[7] */
zone_wan_dest_REJECT all anywhere anywhere ID:66773300
Chain zone_wan_input (1 references)
target prot opt source destination
input_wan_rule all anywhere anywhere ID:66773300 /* user chain for input */
ACCEPT udp fc00::/6 fc00::/6 ID:66773300 udp dpt:dhcpv6-client /* Allow-DHCPv6 */
ACCEPT ipv6-icmp fe80::/10 anywhere ID:66773300 ipv6-icmptype 130 code 0 /* Allow-MLD */
ACCEPT ipv6-icmp fe80::/10 anywhere ID:66773300 ipv6-icmptype 131 code 0 /* Allow-MLD */
ACCEPT ipv6-icmp fe80::/10 anywhere ID:66773300 ipv6-icmptype 132 code 0 /* Allow-MLD */
ACCEPT ipv6-icmp fe80::/10 anywhere ID:66773300 ipv6-icmptype 143 code 0 /* Allow-MLD */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp echo-request limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp echo-reply limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp destination-unreachable limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp packet-too-big limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp time-exceeded limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp bad-header limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp unknown-header-type limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp router-solicitation limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp neighbour-solicitation limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp router-advertisement limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
ACCEPT ipv6-icmp anywhere anywhere ID:66773300 ipv6-icmp neighbour-advertisement limit: avg 1000/sec burst 5 /* Allow-ICMPv6-Input */
zone_wan_src_REJECT all anywhere anywhere ID:66773300
Chain zone_wan_output (1 references)
target prot opt source destination
output_wan_rule all anywhere anywhere ID:66773300 /* user chain for output */
zone_wan_dest_ACCEPT all anywhere anywhere ID:66773300
Chain zone_wan_src_REJECT (1 references)
target prot opt source destination
reject all anywhere anywhere ID:66773300
The script itself says"
WAN6_INTERFACE=$(uci get "network.$WAN6_NAME.ifname") results in eth0
WAN6_GATEWAY=$(route -A inet6 -e | grep "$WAN6_INTERFACE" | awk '/::\/0/{print $2; exit}') results in fe80::1
LAN_ULA_PREFIX=$(uci get network.globals.ula_prefix) results in dd00:1:1:69::/64
since I'm masquerading I wonder why it complains the ICMPv6 packets aren't getting through. Shouldn't that be done automatically by kmod-ipt-nat6?