Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    pfSense's built-in ruleset does not pass inbound MLD (Multicast Listener Discovery) queries

    Scheduled Pinned Locked Moved IPv6
    2 Posts 2 Posters 174 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      therealmaxidude
      last edited by

      Hi,

      I have no idea if this is intended or not, but I observed the following, please confirm:

      Project: pfSense (CE)
      Category: Rules / NAT (default ruleset) -- alternatively: IPv6
      Version: 2.9.0-RELEASE
      Platform: amd64, VM on Proxmox VE (virtio NICs, Open vSwitch bridge)

      Subject:
      Default ruleset blocks inbound MLD queries on WAN; the WAN IPv6 address
      becomes unreachable behind CPEs that do MLD snooping

      DESCRIPTION

      pfSense's built-in ruleset does not pass inbound MLD (Multicast Listener
      Discovery) queries. Queries from the upstream router (sent to ff02::1, link
      scope, with a Hop-by-Hop Router Alert option) fall through to the built-in
      "Default deny rule IPv6" and are dropped. As a result, pfSense never answers
      MLD queries on WAN. It only sends unsolicited MLD reports when an address or
      interface is (re)configured.

      When the upstream CPE (here an ISP cable modem/router) does MLD snooping on
      its switch ports, this has the following effect:

      1. pfSense joins the solicited-node multicast group of its WAN address(es)
        and sends unsolicited MLDv2 reports at boot / WAN (re)configuration /
        DHCPv6 exchange. The CPE registers pfSense's port as a listener.
      2. The CPE sends periodic general MLD queries (here every ~125 s). pf drops
        them, so pfSense never refreshes its membership.
      3. After the snooping entry ages out, the CPE stops forwarding Neighbor
        Solicitations for pfSense's WAN address to pfSense's port.
      4. The CPE can no longer resolve pfSense's WAN global address. All traffic
        sourced from the WAN IPv6 address (gateway monitoring, DNS resolver,
        updates, NTP) stops getting replies.
      5. Traffic for the delegated prefix (LAN clients) keeps working, because it is
        routed to pfSense's link-local address, which is resolved differently.

      Visible symptoms:

      • dpinger shows WAN_DHCP6 as 100% loss / offline, while LAN clients have
        working IPv6.
      • Works for a while after reboot or WAN save/apply, then breaks again.
      • Very hard to diagnose: no NS for the WAN address ever arrives at pfSense,
        so it looks like an ISP problem. The blocked queries only appear in pflog
        as "Default deny rule IPv6".

      RFC 4890 (ICMPv6 filtering recommendations, section 4.4.1) lists MLD messages
      (types 130, 131, 132, 143) with link-local source as traffic that must not be
      dropped when addressed to the firewall itself. pfSense's default ruleset
      already passes the NDP message types, but not MLD.

      STEPS TO REPRODUCE

      1. WAN connected to an upstream router/CPE that:
        • provides the WAN IPv6 address (SLAAC and/or DHCPv6 IA_NA), and
        • does MLD snooping on its LAN ports, and sends periodic MLD general queries.
          (Observed with Telenet CV8560E, Belgium, delegating a /57 to the
          customer router.)
      2. Default pfSense ruleset, no user rules for ICMPv6 on WAN.
      3. Boot pfSense, or save/apply WAN.
      4. Watch the WAN interface:
        tcpdump -ni <wan_if> -v 'ip6 and (dst ff02::16 or dst ff02::1)'
        -> MLD queries from the CPE arrive, pfSense never sends a report in reply.
      5. Watch pflog:
        tcpdump -ni pflog0 -e 'ip6 and dst ff02::1'
        -> queries blocked by "Default deny rule IPv6".
      6. After the CPE's snooping timeout (minutes to hours), pings sourced from
        the WAN global address get no replies:
        ping6 -S <WAN_IPV6_DHCPV6> <MONITOR_IPV6> -> 100% loss
        ping6 -S <LAN_IPV6_PD> <MONITOR_IPV6> -> works

      EXPECTED RESULT

      Inbound MLD queries from link-local sources are passed by the default ruleset
      (same as the NDP types), pfSense answers them with MLDv2 reports, and the WAN
      IPv6 address stays reachable.

      ACTUAL RESULT

      Queries are dropped by the default deny rule, pfSense never answers them, and
      the WAN IPv6 address becomes unreachable once the CPE's snooping entry for
      pfSense's port expires.

      EVIDENCE (addresses masked, see legend below)

      1. pflog - query blocked by the default deny rule:

        10:36:36.257838 rule 1..8/0(match) [ridentifier 1000000105]: block in on vtnet0:
        <ISP_GW_LINKLOCAL> > ff02::1: HBH ICMP6, multicast listener query v2 [gaddr ::], length 28

        pfctl -vvsr | grep -A1 1000000105

        @8 block drop in log inet6 all label "descr=Default deny rule IPv6" label "tags=ruleset:..." ridentifier 1000000105
        [ Evaluations: 340 Packets: 28 Bytes: 3443 States: 0 ]

      2. The stack never received a query (before the fix), even though group
        membership is correct:

        ifmcstat -i vtnet0 -f inet6 | grep -A1 <WAN_SOLICITED_NODE_GROUP>

        group <WAN_SOLICITED_NODE_GROUP>%vtnet0 scopeid 0x1 mode exclude
                mcast-macaddr 33:33:ff:xx:xx:xx
        

        netstat -s -p icmp6 | grep -i listener (two runs >2 min apart)

                    MLDv2 listener report: 32
                    MLDv2 listener report: 32
        

        (no "multicast listener query" input counter at all)

      3. WAN interface capture - queries arrive, other hosts on the segment reply,
        pfSense does not:

        10:21:47.484016 IP6 (hlim 1, next-header HBH (0), payload length 36) <ISP_GW_LINKLOCAL> > ff02::1:
        HBH (rtalert: 0x0000) (pad1)(pad1) [icmp6 sum ok] ICMP6, multicast listener query v2
        [max resp delay=10000] [gaddr :: robustness=2 qqi=125]
        10:21:50.327148 IP6 <OTHER_HOST_1_LINKLOCAL> > ff02::16: ... multicast listener report v2 ...
        10:21:53.420183 IP6 <OTHER_HOST_2_LINKLOCAL> > ff02::16: ... multicast listener report v2 ...
        (no report from <PFSENSE_WAN_LINKLOCAL>)
        10:23:54.451247 IP6 <ISP_GW_LINKLOCAL> > ff02::1: HBH (rtalert: 0x0000) ... multicast listener query v2 ...
        (again no report from <PFSENSE_WAN_LINKLOCAL>)

      4. Proof that the CPE does MLD snooping and is looking for pfSense's WAN
        address: a test host on another CPE port, subscribed to pfSense's
        solicited-node group, while pfSense was in the failed state:

        10:19:17.398 <TEST_HOST_LINKLOCAL> -> ff02::16 MLDv2 Report, group <WAN_SOLICITED_NODE_GROUP>
        10:19:17.479 <ISP_GW_LINKLOCAL> -> <WAN_SOLICITED_NODE_GROUP> NS target <WAN_IPV6_DHCPV6>
        10:19:19.491 <ISP_GW_LINKLOCAL> -> <WAN_SOLICITED_NODE_GROUP> NS target <WAN_IPV6_DHCPV6>
        ... about one per second, never answered ...

        The NS for pfSense's address appeared 80 ms after a listener was
        registered. At the same time, captures on pfSense's WAN (and on the
        hypervisor's physical NIC) showed no NS for that address. The CPE only
        forwarded it to ports with a registered listener.

      5. After adding the workaround rule (see below), within one query interval:

        netstat -s -p icmp6 | grep -i listener

                    MLDv2 listener report: 33
                    multicast listener query: 1
        

        pflog0: no more blocked queries.

      WORKAROUND

      Floating rule (Firewall > Rules > Floating):
      Action: Pass, Quick: yes
      Interface: WAN, Direction: in
      Address family: IPv6, Protocol: ICMP, ICMP subtype: Multicast listener query
      Source: fe80::/10
      Destination: ff02::1
      Advanced: Allow IP options = yes

      (The rule was created with "Allow IP options" enabled. It was not tested
      whether that option is required, since the observed drop was the default
      deny rule rather than the IP-options check.)

      A broader workaround is to pass ICMPv6 types 130/131/132/143 from fe80::/10
      to ff02::/16 on interfaces with IPv6 enabled.

      SUGGESTED FIX

      Add built-in pass rules for MLD, alongside the existing built-in NDP rules,
      on interfaces with IPv6 enabled:
      pass in quick inet6 proto ipv6-icmp from fe80::/10 to ff02::/16
      icmp6-type { 130, 131, 132, 143 } allow-opts
      (and the matching outbound rule, if outbound reports are not already covered).

      ENVIRONMENT DETAILS

      • pfSense 2.9.0-RELEASE, PHP 8.5.12
      • WAN: IPv4 DHCP + DHCPv6 (IA_NA + IA_PD /57, prefix hint), LAN Track Interface
      • Packages: Suricata (stopped during testing), pfBlockerNG, OpenVPN, lldpd
      • CPE: Telenet CV8560E (Belgium), MLDv2 querier, qqi=125, robustness=2
      • This setup worked for over a year. The problem appeared after an
        ISP-side change on the CPE (most likely MLD snooping was enabled or
        changed), which suggests other users behind the same CPE model may be
        affected.

      ADDRESS PLACEHOLDERS

      <WAN_IPV6_DHCPV6> pfSense WAN global address (DHCPv6 IA_NA /128)
      <WAN_SOLICITED_NODE_GROUP> solicited-node multicast group of that address (ff02::1:ffxx:xxxx)
      <LAN_IPV6_PD> pfSense LAN address from the delegated prefix
      <PFSENSE_WAN_LINKLOCAL> pfSense WAN link-local address
      <ISP_GW_LINKLOCAL> CPE link-local address (IPv6 default gateway, MLD querier)
      <TEST_HOST_LINKLOCAL> test laptop on another CPE LAN port
      <OTHER_HOST_1/2_LINKLOCAL> other hosts on the CPE LAN segment
      <MONITOR_IPV6> public IPv6 used as the gateway monitor target

      dennypageD 1 Reply Last reply
      Reply Quote 0
      • dennypageD
        dennypage @therealmaxidude
        last edited by

        @therealmaxidude You need to explicitly allow IGMP and/or MLD. I would generally recommend using a (Local) interface group rather than a floating rule.

        This is the rule you need for IGMP:
        IGMP rule.png

        And this is the rule you need for MLD:
        MLD rule.png

        NB: If you are only trying to support a multicast listener on pfSense, you only need to allow Multicast listener query. However, if you are using something like mcast-bridge you need to allow Multicast listener report and Multicast listener done as well.

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
        Privacy Policy · Cookie Policy