My ISP does not have IPv6 at all. So I am adding a HE tunnel broker to OpenWRT 24.10.0 on ZTE MF286D.
The router sits under a company network, and I don't have control over the public IPv4 address or the company's IT infrastructure.
I created a new HE tunnel broker. It does not give me route /48, and I don't know how to enable it.
Server IPv4 Address:216.66.80.90
Server IPv6 Address:2001:470:27:3c1::1/64
Client IPv4 Address:77.91.218.123
Client IPv6 Address:2001:470:27:3c1::2/64
Routed /64:2001:470:28:3b7::/64
Anycast IPv6 Caching Nameserver:2001:470:20::2
Anycast IPv4 Caching Nameserver:74.82.42.42
DNS over HTTPS / DNS over TLS:ordns.he.net
I am following these guides:
Since I want to prioritize IPv4 WAN, I use a high metric 2048 to the wan6.
Basically I add these to network config:
config interface 'wan6'
option proto '6in4'
option mtu '1480'
option ipaddr '192.168.80.55'
option peeraddr '216.66.80.90'
option ip6addr '2001:470:27:3c1::2/64'
option ip6prefix '2001:470:28:3b7::/64'
option tunnelid '984056'
option username 'USERNAME'
option password 'PASSWORD'
option metric '2048'
config route6
option interface 'wan6'
option target '::/0'
And I add these to firewall config:
config rule
option name '6to4'
option target 'ACCEPT'
option src 'wan'
option proto '41'
I have the following full active config:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd9e:fe62:a252::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
option metric '10'
config interface 'wan6'
option proto '6in4'
option mtu '1480'
option ipaddr '192.168.80.55'
option peeraddr '216.66.80.90'
option ip6addr '2001:470:27:3c1::2/64'
option ip6prefix '2001:470:28:3b7::/64'
option tunnelid '984056'
option username 'USERNAME'
option password 'PASSWORD'
option metric '2048'
config route6
option interface 'wan6'
option target '::/0'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
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'
config rule
option name '6to4'
option target 'ACCEPT'
option src 'wan'
option proto '41'
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
And my network status:
root@OpenWrt:~# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:60 brd ff:ff:ff:ff:ff:ff
3: lan4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:60 brd ff:ff:ff:ff:ff:ff
4: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:60 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:60 brd ff:ff:ff:ff:ff:ff
6: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:61 brd ff:ff:ff:ff:ff:ff
7: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
8: wwan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether d6:b9:06:01:b3:c9 brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether c8:ea:f8:de:38:60 brd ff:ff:ff:ff:ff:ff
10: 6in4-wan6@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/sit 192.168.80.55 peer 216.66.80.90
root@OpenWrt:~# ip route show
default via 192.168.80.1 dev wan proto static src 192.168.80.55 metric 10
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.80.0/24 dev wan proto static scope link metric 10
216.66.80.90 via 192.168.80.1 dev wan proto static metric 10
root@OpenWrt:~# ip -6 route show
default from 2001:470:27:3c1::/64 dev 6in4-wan6 proto static metric 2048 pref medium
default from 2001:470:28:3b7::/64 dev 6in4-wan6 proto static metric 2048 pref medium
2001:470:27:3c1::/64 dev 6in4-wan6 proto static metric 2048 pref medium
2001:470:28:3b7::/64 dev br-lan proto static metric 1024 pref medium
unreachable 2001:470:28:3b7::/64 dev lo proto static metric 2147483647 pref medium
fd9e:fe62:a252::/64 dev br-lan proto static metric 1024 pref medium
unreachable fd9e:fe62:a252::/48 dev lo proto static metric 2147483647 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev br-lan proto kernel metric 256 pref medium
fe80::/64 dev wan proto kernel metric 256 pref medium
fe80::/64 dev 6in4-wan6 proto kernel metric 256 pref medium
default dev 6in4-wan6 proto static metric 2048 pref medium
It works with ping6:
root@OpenWrt:~# ping6 -c2 www.google.com
PING www.google.com (2a00:1450:4002:410::2004): 56 data bytes
64 bytes from 2a00:1450:4002:410::2004: seq=0 ttl=117 time=33.929 ms
64 bytes from 2a00:1450:4002:410::2004: seq=1 ttl=117 time=34.117 ms
--- www.google.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 33.929/34.023/34.117 ms
However, running "opkg update" just time out.
I also tried:
root@OpenWrt:~# curl -v https://downloads.openwrt.org/releases/24.10.0/targets/ipq40xx/generic/packages/Packages.gz
* Connection timed out after 300196 milliseconds
curl: (28) Connection timed out after 300196 milliseconds
I try to turn down the problematic wan6 interface by ipdown wan6
, then the router can reach the Internet and opkg update
works again.
But then I lost the IPv6 access to HE, this is not what I want.
Could someone help to check what I am missing? Thanks in advance!