This article discussed Backfire 10.03.x and earlier Openwrt releases. For advice targeting Attitude Adjustment 12.09.x, Barrier Breaker 14.07, Chaos Calmer 15.05 and later, please see the current advice for IPv6.
To use IPv6, the following modules may or may not be necessary:
opkg install kmod-ipv6 radvd ip kmod-ip6tables ip6tables
To enable basic IPv6 support in OpenWRT Backfire (10.03), install the IPv6 kernel module using the shell:
root@OpenWrt:/# opkg install kmod-ipv6
root@OpenWrt:/# /etc/init.d/network restart
Verify by running ifconfig and making sure there are inet6 addresses listed:
root@OpenWrt:/# ifconfig
eth0 Link encap:Ethernet HWaddr <hwaddr>
inet addr:192.168.0.211 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: <globaladdr> Scope:Global
inet6 addr: <linklocaladdr Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:110 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12632 (12.3 KiB) TX bytes:1966 (1.9 KiB)
Interrupt:10 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:496 (496.0 B) TX bytes:496 (496.0 B)
This assumes you have static both ipv4 and ipv6 addresses. Add lines
option ip6addr 'your:ipv6::address/prefix' option ip6gw 'your:ipv6::gateway''
and modify you dns servers (assuming 1.2.3.4 5.6.7.8 are your ipv4 DNS servers incapable of handling ipv6 traffic) accordingly:
option dns '1.2.3.4 5.6.7.8 1:2:3:4:5:: 6:7:8:90:10::'
in config interface wan section of your /etc/config/network
This is enabled by default on r31572 (and later). — sup 2012/05/16 15:00
To forward packets between interfaces, a kernel-level setting must be enabled. Insert the following line to /etc/sysctl.conf:
net.ipv6.conf.all.forwarding=1
and reboot or execute /etc/init.d/sysctl start to commit your changes. To verify, cat /proc/sys/net/ipv6/conf/all/forwarding needs to return 1.
ping6 ipv6.google.comping6 [2a00:1450:8002::93] does, it means that your DNS server is not resolving IPv6 addresses at all: changing it will be necessary./etc/config/firewall, you either must not have line option disable_ipv6 1or have line
option disable_ipv6 0
ip6tables -FNote that this effectively shuts down your firewall, so use this only for debugging purposes and start your firewall (reboot or
/etc/init.d/firewall restart) right after you are done.