6rd configured, local ipv6 working, but no ping/connect outside?

I've read through https://openwrt.org/docs/guide-user/network/ipv6/configuration and some posts in the forums about IPv6 and 6rd, but still have not figured out what I'm doing wrong.

I got my 6rd parameters from here: https://tunnelbroker.acsalaska.net/6rd/?clientip=216.67.98.32

I configured my wan6 interface with the information given there (I'll paste my network and dhcp config below). I used Luci to config everything. No manual tweaking at this point.

I can ping my router over IPv6 from my laptop, and the router can ping my laptop. Example:

PING tehillah.azariah.com (2602:233:d843:6220::343): 56 data bytes
64 bytes from 2602:233:d843:6220::343: seq=0 ttl=64 time=22.323 ms
64 bytes from 2602:233:d843:6220::343: seq=1 ttl=64 time=5.221 ms
64 bytes from 2602:233:d843:6220::343: seq=2 ttl=64 time=2.973 ms
64 bytes from 2602:233:d843:6220::343: seq=3 ttl=64 time=2.739 ms
64 bytes from 2602:233:d843:6220::343: seq=4 ttl=64 time=2.298 ms

--- tehillah.azariah.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 2.298/7.110/22.323 ms

But I cannot ping or connect outside my network. I've been over all my routing and network rules, and I still can't figure out what is wrong. Tips and suggestions welcome! :slight_smile: Thanks!

This is OpenWRT 22.03.3

/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 'fdc8:d00e:c137::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

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 'eth1'
        option proto 'pppoe'
        option username 'USER'
        option password '****'
        option ipv6 'auto'

config interface 'wan6'
        option proto '6rd'
        option peeraddr '209.112.142.2'
        option peerdns '0'
        list dns '2001:4948::53'
        list dns '2001:4948::54'
        option ip6prefixlen '32'
        option ip6prefix '2602:233::'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '3 4 0'

/etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        option domain 'azariah.com'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        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'

config dhcp 'wan6'
        option interface 'wan6'
        option ignore '1'

Output of ifstatus wan6

{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 168326,
        "l3_device": "6rd-wan6",
        "proto": "6rd",
        "updated": [
                "addresses",
                "routes",
                "prefixes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [

        ],
        "ipv6-address": [
                {
                        "address": "2602:233:d843:6220::1",
                        "mask": 32
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2602:233:d843:6220::",
                        "mask": 64,
                        "class": "wan6",
                        "assigned": {
                                "lan": {
                                        "address": "2602:233:d843:6220::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "::d170:8e02",
                        "metric": 4096,
                        "source": "2602:233:d843:6220::1/32"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "::d170:8e02",
                        "metric": 4096,
                        "source": "2602:233:d843:6220::/64"
                }
        ],
        "dns-server": [
                "2001:4948::53",
                "2001:4948::54"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {

        }
}

output of nft list ruleset

table inet fw4 {
        chain input {
                type filter hook input priority filter; policy accept;
                iifname "lo" accept comment "!fw4: Accept traffic from loopback"
                ct state established,related accept comment "!fw4: Allow inbound established and related flows"
                tcp flags syn / fin,syn,rst,ack jump syn_flood comment "!fw4: Rate limit TCP syn packets"
                iifname "br-lan" jump input_lan comment "!fw4: Handle lan IPv4/IPv6 input traffic"
                iifname { "6rd-wan6", "pppoe-wan" } jump input_wan comment "!fw4: Handle wan IPv4/IPv6 input traffic"
        }

        chain forward {
                type filter hook forward priority filter; policy drop;
                ct state established,related accept comment "!fw4: Allow forwarded established and related flows"
                iifname "br-lan" jump forward_lan comment "!fw4: Handle lan IPv4/IPv6 forward traffic"
                iifname { "6rd-wan6", "pppoe-wan" } jump forward_wan comment "!fw4: Handle wan IPv4/IPv6 forward traffic"
                jump handle_reject
        }

        chain output {
                type filter hook output priority filter; policy accept;
                oifname "lo" accept comment "!fw4: Accept traffic towards loopback"
                ct state established,related accept comment "!fw4: Allow outbound established and related flows"
                oifname "br-lan" jump output_lan comment "!fw4: Handle lan IPv4/IPv6 output traffic"
                oifname { "6rd-wan6", "pppoe-wan" } jump output_wan comment "!fw4: Handle wan IPv4/IPv6 output traffic"
        }

        chain prerouting {
                type filter hook prerouting priority filter; policy accept;
                iifname "br-lan" jump helper_lan comment "!fw4: Handle lan IPv4/IPv6 helper assignment"
        }

        chain handle_reject {
                meta l4proto tcp reject with tcp reset comment "!fw4: Reject TCP traffic"
                reject comment "!fw4: Reject any other traffic"
        }

        chain syn_flood {
                limit rate 25/second burst 50 packets return comment "!fw4: Accept SYN packets below rate-limit"
                drop comment "!fw4: Drop excess packets"
        }

        chain input_lan {
                ct status dnat accept comment "!fw4: Accept port redirections"
                jump accept_from_lan
        }

        chain output_lan {
                jump accept_to_lan
        }

        chain forward_lan {
                jump accept_to_wan comment "!fw4: Accept lan to wan forwarding"
                ct status dnat accept comment "!fw4: Accept port forwards"
                jump accept_to_lan
        }

        chain helper_lan {
        }

        chain accept_from_lan {
                iifname "br-lan" counter packets 118754 bytes 9051794 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
        }

        chain accept_to_lan {
                oifname "br-lan" counter packets 20097 bytes 1643026 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
        }

        chain input_wan {
                meta nfproto ipv4 udp dport 68 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCP-Renew"
                icmp type echo-request counter packets 25303 bytes 1092984 accept comment "!fw4: Allow-Ping"
                meta nfproto ipv4 meta l4proto igmp counter packets 0 bytes 0 accept comment "!fw4: Allow-IGMP"
                meta nfproto ipv6 udp dport 546 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCPv6"
                ip6 saddr fe80::/10 icmpv6 type . icmpv6 code { mld-listener-query . no-route, mld-listener-report . no-route, mld-listener-done . no-route, mld2-listener-report . no-route } counter packets 0 bytes 0 accept comment "!fw4: Allow-MLD"
                icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply, nd-router-solicit, nd-router-advert } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Input"
                icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, nd-neighbor-solicit . no-route, nd-neighbor-advert . no-route, parameter-problem . admin-prohibited } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Input"
                ct status dnat accept comment "!fw4: Accept port redirections"
                jump reject_from_wan
        }

        chain output_wan {
                jump accept_to_wan
        }

        chain forward_wan {
                icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
                icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, parameter-problem . admin-prohibited } limit rate 1000/second counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
                meta l4proto esp counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-IPSec-ESP"
                udp dport 500 counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-ISAKMP"
                ct status dnat accept comment "!fw4: Accept port forwards"
                jump reject_to_wan
        }

        chain accept_to_wan {
                oifname { "6rd-wan6", "pppoe-wan" } counter packets 437498 bytes 81771286 accept comment "!fw4: accept wan IPv4/IPv6 traffic"
        }

        chain reject_from_wan {
                iifname { "6rd-wan6", "pppoe-wan" } counter packets 48479 bytes 2144166 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
        }

        chain reject_to_wan {
                oifname { "6rd-wan6", "pppoe-wan" } counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
        }

        chain dstnat {
                type nat hook prerouting priority dstnat; policy accept;
                iifname "br-lan" jump dstnat_lan comment "!fw4: Handle lan IPv4/IPv6 dstnat traffic"
                iifname { "6rd-wan6", "pppoe-wan" } jump dstnat_wan comment "!fw4: Handle wan IPv4/IPv6 dstnat traffic"
        }

        chain srcnat {
                type nat hook postrouting priority srcnat; policy accept;
                oifname "br-lan" jump srcnat_lan comment "!fw4: Handle lan IPv4/IPv6 srcnat traffic"
                oifname { "6rd-wan6", "pppoe-wan" } jump srcnat_wan comment "!fw4: Handle wan IPv4/IPv6 srcnat traffic"
        }

        chain dstnat_lan {
                ip saddr 192.168.1.0/24 ip daddr 216.67.98.32 tcp dport 4971 dnat ip to 192.168.1.200:4971 comment "!fw4: Backup Server (reflection)"
        }

        chain srcnat_lan {
                ip saddr 192.168.1.0/24 ip daddr 192.168.1.200 tcp dport 4971 snat ip to 192.168.1.1 comment "!fw4: Backup Server (reflection)"
        }

        chain dstnat_wan {
                meta nfproto ipv4 tcp dport 4971 counter packets 494 bytes 29640 dnat ip to 192.168.1.200:4971 comment "!fw4: Backup Server"
        }

        chain srcnat_wan {
                meta nfproto ipv4 masquerade comment "!fw4: Masquerade IPv4 wan traffic"
        }

        chain raw_prerouting {
                type filter hook prerouting priority raw; policy accept;
        }

        chain raw_output {
                type filter hook output priority raw; policy accept;
        }

        chain mangle_prerouting {
                type filter hook prerouting priority mangle; policy accept;
        }

        chain mangle_postrouting {
                type filter hook postrouting priority mangle; policy accept;
        }

        chain mangle_input {
                type filter hook input priority mangle; policy accept;
        }

        chain mangle_output {
                type route hook output priority mangle; policy accept;
        }

        chain mangle_forward {
                type filter hook forward priority mangle; policy accept;
                iifname { "6rd-wan6", "pppoe-wan" } tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 ingress MTU fixing"
                oifname { "6rd-wan6", "pppoe-wan" } tcp flags syn tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 egress MTU fixing"
        }
}

From the router, can IP6 sites be pinged? I'm not expecting the LAN to work yet, see below.

Since the ISP only gives you a /64, this use case has the LAN devices assigned addresses within the same /64 and they need to be relayed, not routed, to the WAN. This is covered in the setup page.

No. If I go to /cgi-bin/luci/admin/network/diagnostics and try to IPv6 ping openwrt.org, it fails.

OK, I'm new to all this. I'll try to find those directions and see if it changes anything.

Thanks for the poitners!

Well, that stinks. Apparently my ISP's 6rd service is broken. A friend who has the same ISP told me

So far I have confirmed that ACS 6rd emits IPv4 -> IPv6 packets… but doesn't return them back IPv6 -> IPv4

And tcpdump'ing my 6rd-wan6 interface shows lots of packets going out, and none coming in, apparently verifying his findings.

I guess I'm going to have to do a Hurricane electric tunnel or something. I was hoping to avoid that.