My network looks like this: ISP - modem - Openwrt router - LAN devices
Before I switched to openwrt, I used tp-link which has IPv6 passthrough mode. It worked flawlessly. After switching to openwrt I can't use IPv6. I tried many things to make it work. I've set relay mode on WAN6 and LAN. After doing that, my devices get ipv6 addresses but I can't use them. After using tcpdump, I noticed that ICMPv6 pings are reaching google.com and google is replying to my ping requests but they are not reaching my LAN devices. If I ping the IPv6 address of the router from a device, then IPv6 works on that device. That device gets added to the 'IPv6 Neighbours' list. IPv6 only works if the LAN device is in the 'IPv6 Neighbours' list. There's a problem with Neighbour discovery.
Running ip neigh on the router shows that many LAN IPv6 addresses are not reachable. IPv6 addresses with 'br-lan' are reachable but those with 'wan' are not reachable.
The router gets a /64 ipv6 address so I can't subnet it further. Is there any solution to this?
I removed those lines but it still doesn't work. I think there is a routing problem between WAN and LAN interfaces. ICMPv6 reply packets are not reaching LAN devices from WAN interface.
Here's my firewall config
cat /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
list network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
You are specifically asking for a /64 PD in the above reqprefix. Change that to 56, and maybe also add option ip6assign 56 to the lan interface and restart your network. If your ISP is cooperative, you should end up with working IPv6 delegation for all of the capable devices on your lan.
Wow, that sucks. Plus they're biting off their own tail by making it harder to adopt something that will save them money in the long term (IPv4 address prices are skyrocketing, while IPv6 ranges are basically free). I guess it's impossible to underestimate the stupidity of ISPs...
If the ISP only offers a single /64, don't request a prefix at all, and use RA and NDP in relay mode. Your LAN clients will SLAAC their address within the same /64, so they do have a unique public IP and a non-NAT connection to the Internet. The LAN interface itself will not hold a public IPv6-- it doesn't need to, only the WAN does.
They don't care, in my country some ISP use MAP-E which shares single IPv4 for customer 4-to-6, and they provide their own routers, that's it! That's why I've spent so much time to figure out how to build my own router with OpenWrt (anything else won't work, pfSense/OPNsense/RouterOS are not working).