IPv6 is gaining its popularity these days but a home router mostly acts as an IPv4 NAT gateway for LAN behind it, lacking IPv6 support. Some routers have an IPv6 passthrough feature to bypass IPv6 traffic if ISPs do provide it while in OpenWrt it will be a little complicated.
- Newer versions of OpenWrt do have good IPv6 support that should be working even out of box.
- This is for native non-tunneled IPv6 usage.
- This method completely relies on the kernel support of the table broute in ebtables. If you insist on trying, kernel support of broute must be tested before using. Otherwise it will cause trouble that local DHCP server leaks to upstream. Thus DO NOT TRY IT unless you are clear.
- This method is only tested under Attitude Adjustment however according to comments here and here, it works in Chaos Calmer. In a word, you might need upgrade before using this direct bridging method.
- You might also try IPv6 NAT with OpenWrt router.
Make sure OpenWrt acquires IPv6 support and bridging firewall toolkit.
- Login to LuCI of OpenWrt via web browser
- Go to System >> Software
- Try to download and install kmod-ipv6 and ebtables (you may want to update lists first)
Assume WAN device of the router is eth1 which is easily obtained from LuCI‘s status page
- Go to System >> Startup
- Append following lines in Local Startup section (replace eth1 accordingly)
123ebtables -t broute -A BROUTING -i eth1 -p ! ipv6 -j DROP && brctl addif br-lan eth1echo 2 > /proc/sys/net/ipv6/conf/br-lan/accept_raecho 1 > /proc/sys/net/ipv6/conf/br-lan/forwarding
Reboot the router and everything done.