Networking

OpenWrt: DHCPv6 PD present but clients intermittently lack IPv6 default route after enabling RA firewall filtering

Environment

Environment

OpenWrt 22.03 on home router (ath79), LAN bridge br-lan, radvd disabled, odhcpd handling RA; clients include Ubuntu 22.04 laptop, Android 12 phones and an Apple TV. SLAAC + DHCPv6-PD used to advertise prefix; firewall has recent nftables/iptables RA filtering rules added to block forged RAs.

Symptoms

Symptoms

Clients intermittently obtain IPv6 address but show no default route (::/0) and cannot reach IPv6-only sites. Issue happens more after DHCPv6 PD renewals or when LAN switch port flaps. Some clients recover after toggling wifi or reboot; others require 30–60s.

Observations

Observations

Router shows PD delegation active and prefix present (ip -6 addr / ip -6 route shows ::/0 on router). odhcpd logs alternating 'advertise' entries and occasional 'RA dropped by firewall'. tcpdump on br-lan shows RAs being sent but sometimes rejected by kernel nf_conntrack helper rules. Affected clients show RA packets arriving but ignore them (no default route added).

Already attempted

Already attempted

Restarted odhcpd and network; temporarily disabled custom nftables RA rules and problem stopped for several hours. Re-applied rules and problem returned. Upgraded to latest OpenWrt snapshot with same behavior. Cleared client ND cache; issue persists. Replaced switch port and cable — no change.

Question

Question

Why do clients intermittently ignore RAs / default route despite RAs being sent, and what minimal configuration change will reliably restore default route propagation without disabling RA filtering entirely?

COMMUNITY RESPONSES

Verified community troubleshooting

1 reply
0
viggovpn Answer
user
Posted 4w ago • 0 confirmations

Start by checking firewall rules that touch ICMPv6 before conntrack. On OpenWrt, add explicit accepts for ICMPv6 RA/NS/NA in the raw/PREROUTING path so those packets never hit drop logic. Example: in nftables/prerouting add a rule to accept icmpv6 type 134,135,136. Then trigger a PD renewal and watch tcpdump on br-lan to confirm RAs arrive and clients add ::/0 (ip -6 route). If that fixes it, narrow accept rules to the LAN interface only; rollback by restoring original nft ruleset.

Showing 1 of 1 community responses
AI DIAGNOSTICS

Incident analysis

Updated 4w ago• Trouble ID

Most likely causes

Custom nftables/iptables rules in raw/PREROUTING stage are matching and dropping RA (ICMPv6 type 134) packets intermittently (ordering/conntrack interaction). 90%
odhcpd sending RAs with inconsistent lifetimes/M-bit due to PD renewal race; some clients treat those as invalid. 40%
Multicast or neighbor-solicitation packet loss on switch causing clients to miss parts of RA or ND sequence. 30%

Summary

Evidence points to the router's RA packets sometimes being dropped or modified by firewall/nftables rules (or conntrack) so that clients receive malformed RAs or the kernel suppresses processing. The fact that disabling the custom RA filtering rules stops the issue indicates those rules or the ordering with conntrack/raw table is the trigger. Timing around PD renewals and LAN layer flaps suggests RAs are retried and then hit a path where NF hooks drop or alter ICMPv6 type-134 messages. Some clients may ignore RAs that have changed M/O flags or have inconsistent lifetimes.

Suggested Fixes

Diagnostic step 1
On the OpenWrt router, move RA/ICMPv6 allow/deny rules to the raw table's PREROUTING hook carefully: explicitly allow icmpv6 type 134/135/136 before any drop rules to ensure RAs/NS/NA pass. Use nftables syntax if using nft.
Diagnostic step 2
Temporarily enable verbose logging for firewall matches on RA packets to confirm which rule is dropping them (log then watch dmesg/journal).
Diagnostic step 3
If using conntrack bypass (raw table) for performance, add specific accept rules for 'ip6 nexthdr ipv6-icmp icmpv6 type { 134,135,136 }' before conntrack-bypass entries.

Continue troubleshooting

Matched from the title, description and tags