Hi everybody,
I have been bumping my head against this issue for too many months and would really like to solve this now, but don't know where to continue debugging.
Issue: Android clients on WiFi often fail to connect through OPNsense on IPv6 to the WAN connection, while all other Linux hosts work fine, with static IPv6 addresses assigned manually as well as with SLAAC and privacy extensions generated addresses.
Setup: I run a cluster of two OPNsense firewalls. IPv6 address space is assigned by the FTTH provider with DHCPv6-PD over PPPoE on the respective master firewall. This works without issues, and I assign a derived address to the WAN interface (PPPoE) through a Virtual IP Alias to make sure the firewall itself is globally reachable through IPv6. All local interfaces (on VLANs assigned to a trunk port) are tracking the WAN interface for IPv6 with unique prefixes. Additionally, some of the local interfaces have ULA Virtual IP Aliases (statically as well as through CARP tied to the IPv4 shared address) for local IPv6 connectivity when the WAN side is down.
All_local is an interface group around all local interfaces (those that are neither WAN nor VPN).
Firewall rules: Fairly simple setup for each of the local interfaces: e.g. for the Guest interface, the first interface-specific rule is
When I watch the traffic on this interface locally on the firewall shell with tcpdump, I see the traffic from the (randomized) MAC address of an Android device trying to run https://test-ipv6.com:
but no replies. In the firewall live log, when filtering for this (randomized) SLAAC address, I see some pass, but also some occasional block messages:
The weirdest thing is that, when disconnecting the Android device from WiFi and reconnecting (forcing a refresh of the SLAAC addresses), it occasionally works for a brief period (in the range of minutes) before it fails again. Other Linux hosts work consistently. I have tried many different things during debugging (disabling source or destination matches, adding an explicit only-IPv6 rule, etc.) and am completely confused why that rule might not match some of the packets. Any hints would be greatly appreciated.
I have been bumping my head against this issue for too many months and would really like to solve this now, but don't know where to continue debugging.
Issue: Android clients on WiFi often fail to connect through OPNsense on IPv6 to the WAN connection, while all other Linux hosts work fine, with static IPv6 addresses assigned manually as well as with SLAAC and privacy extensions generated addresses.
Setup: I run a cluster of two OPNsense firewalls. IPv6 address space is assigned by the FTTH provider with DHCPv6-PD over PPPoE on the respective master firewall. This works without issues, and I assign a derived address to the WAN interface (PPPoE) through a Virtual IP Alias to make sure the firewall itself is globally reachable through IPv6. All local interfaces (on VLANs assigned to a trunk port) are tracking the WAN interface for IPv6 with unique prefixes. Additionally, some of the local interfaces have ULA Virtual IP Aliases (statically as well as through CARP tied to the IPv4 shared address) for local IPv6 connectivity when the WAN side is down.
All_local is an interface group around all local interfaces (those that are neither WAN nor VPN).
Firewall rules: Fairly simple setup for each of the local interfaces: e.g. for the Guest interface, the first interface-specific rule is
- pass
- non-quick
- interface: Guest
- Direction: in
- TCP/IP Version: IPv4/IPv6
- Protocol: any
- Source: Guest net
- Destination: (inverted) All_local net
- Occasionally with logging enabled while I am debugging, and also experimented with advanced "State Type" set to "sloppy", but that does not seem to change anything.
When I watch the traffic on this interface locally on the firewall shell with tcpdump, I see the traffic from the (randomized) MAC address of an Android device trying to run https://test-ipv6.com:
Code Select
20:33:55.367693 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40900 > 2600:3c0e::f03c:94ff:fed0:118c.443: Flags [S], seq 3874906471, win 65535, options [mss 1432,sackOK,TS val 502769255 ecr 0,nop,wscale 8], length 0
20:33:55.414492 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40510 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 1619834821, win 65535, options [mss 1432,sackOK,TS val 2932320577 ecr 0,nop,wscale 8], length 0
20:33:55.437239 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40512 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 4131834176, win 65535, options [mss 1432,sackOK,TS val 2932320598 ecr 0,nop,wscale 8], length 0
20:33:55.463117 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.47108 > 2a01:7e01:e001:8a6::1280.443: Flags [S], seq 1539005391, win 65535, options [mss 1432,sackOK,TS val 2440076159 ecr 0,nop,wscale 8], length 0
20:33:55.473900 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40516 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 3851900761, win 65535, options [mss 1432,sackOK,TS val 2932320635 ecr 0,nop,wscale 8], length 0
20:33:55.479104 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40532 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 3848844477, win 65535, options [mss 1432,sackOK,TS val 2932320641 ecr 0,nop,wscale 8], length 0
20:33:55.620392 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40916 > 2600:3c0e::f03c:94ff:fed0:118c.443: Flags [S], seq 1870185323, win 65535, options [mss 1432,sackOK,TS val 502769508 ecr 0,nop,wscale 8], length 0
20:33:55.667322 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40536 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 2725483835, win 65535, options [mss 1432,sackOK,TS val 2932320829 ecr 0,nop,wscale 8], length 0
20:33:55.690199 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40550 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 3188154451, win 65535, options [mss 1432,sackOK,TS val 2932320851 ecr 0,nop,wscale 8], length 0
20:33:55.716457 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.47118 > 2a01:7e01:e001:8a6::1280.443: Flags [S], seq 1085541019, win 65535, options [mss 1432,sackOK,TS val 2440076413 ecr 0,nop,wscale 8], length 0
20:33:55.725721 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40552 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 2983529768, win 65535, options [mss 1432,sackOK,TS val 2932320887 ecr 0,nop,wscale 8], length 0
20:33:56.392231 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40900 > 2600:3c0e::f03c:94ff:fed0:118c.443: Flags [S], seq 3874906471, win 65535, options [mss 1432,sackOK,TS val 502770279 ecr 0,nop,wscale 8], length 0
20:33:56.419442 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40510 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 1619834821, win 65535, options [mss 1432,sackOK,TS val 2932321581 ecr 0,nop,wscale 8], length 0
20:33:56.487596 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.47108 > 2a01:7e01:e001:8a6::1280.443: Flags [S], seq 1539005391, win 65535, options [mss 1432,sackOK,TS val 2440077184 ecr 0,nop,wscale 8], length 0
20:33:56.644072 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40916 > 2600:3c0e::f03c:94ff:fed0:118c.443: Flags [S], seq 1870185323, win 65535, options [mss 1432,sackOK,TS val 502770531 ecr 0,nop,wscale 8], length 0
20:33:56.675675 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.40536 > 2a01:7e01::f03c:94ff:fed0:4087.443: Flags [S], seq 2725483835, win 65535, options [mss 1432,sackOK,TS val 2932321837 ecr 0,nop,wscale 8], length 0
20:33:56.739577 02:a2:4a:0c:29:fd > 00:0d:b9:58:5e:2a, ethertype IPv6 (0x86dd), length 94: 2a03:fa00:650:31:b307:9f59:86f:33a9.47118 > 2a01:7e01:e001:8a6::1280.443: Flags [S], seq 1085541019, win 65535, options [mss 1432,sackOK,TS val 2440077436 ecr 0,nop,wscale 8], length 0but no replies. In the firewall live log, when filtering for this (randomized) SLAAC address, I see some pass, but also some occasional block messages:
Code Select
Guest In 2026-01-02T20:33:15 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:37112 [2a01:7e01:e001:8a6::1280]:443 pass Allow Guest to WAN
Guest In 2026-01-02T20:33:15 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:39150 [2a01:7e01::f03c:94ff:fed0:4087]:443 pass Allow Guest to WAN
Guest In 2026-01-02T20:33:12 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:59330 [2a00:1450:4001:80e::200a]:443 block Default deny / state violation rule
Guest In 2026-01-02T20:33:03 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:60540 [2a00:1450:4001:831::2003]:443 pass Allow Guest to WAN
Guest In 2026-01-02T20:33:03 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:60530 [2a00:1450:4001:831::2003]:443 pass Allow Guest to WAN
Guest In 2026-01-02T20:33:00 TCP [2a03:fa00:650:31:b307:9f59:86f:33a9]:60040 [2a01:7e01::f03c:94ff:fed0:4087]:443 pass Allow Guest to WANThe weirdest thing is that, when disconnecting the Android device from WiFi and reconnecting (forcing a refresh of the SLAAC addresses), it occasionally works for a brief period (in the range of minutes) before it fails again. Other Linux hosts work consistently. I have tried many different things during debugging (disabling source or destination matches, adding an explicit only-IPv6 rule, etc.) and am completely confused why that rule might not match some of the packets. Any hints would be greatly appreciated.
"