Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to block unknown IPv6 across tunnel

    Scheduled Pinned Locked Moved Firewalling
    11 Posts 4 Posters 865 Views
    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.
    • JKnottJ
      JKnott @msf2000
      last edited by

      @msf2000

      That depends a lot on the relationship of those addresses to the desired ones. Perhaps you could create a rule that allows only the desired addresses, followed by one that blocks everything else.

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      M 1 Reply Last reply Reply Quote 0
      • M
        msf2000 @JKnott
        last edited by

        @jknott

        That's the strange part of this whole thing... I have default deny on all interfaces (at least I think I do), so shouldn't pfSense block anything not matching a rule?

        I think matching specific IPv6 addresses to block is like holding back the ocean....

        awebsterA johnpozJ JKnottJ 3 Replies Last reply Reply Quote 0
        • awebsterA
          awebster @msf2000
          last edited by

          @msf2000 If it is of any use, this appears to be traffic from T-Mobile to Facebook, most likely some form of STUN or TURN protocol.
          I can only think that there is a misconfiguration at the ISP/Tunnel provider that you would cause you to receive traffic not specifically for you.

          –A.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @msf2000
            last edited by

            Where exactly are you seeing that flow?

            That one IP is owned by facebook

            2a03:2880::/29

            Just because you see a flow, doesn't mean it went anywhere, firewall could of blocked it.. Your just seeing one side of the traffic, sent from IP1 to IP2..

            Not sure why that should be listed as unknown 3478 is common STUN port..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            M 1 Reply Last reply Reply Quote 0
            • M
              msf2000 @johnpoz
              last edited by

              @johnpoz

              OK, that actually helps. My sensor (IDS) is located inside the firewall, so I would see connection attempts even if blocked by pfSense.

              My working theory is that a mobile device is switching from LTE to Wifi but keeping their old IPv6 address....

              I will try blocking unauthorized IPv6 on the inside and see if I get a hit (log).

              awebsterA johnpozJ 2 Replies Last reply Reply Quote 0
              • awebsterA
                awebster @msf2000
                last edited by

                @msf2000 I believe your theory is correct. I have seen this type of behavior before on my WLAN infrastructure whereby the device sends traffic from the LTE IP address but on the WiFi interface. I don't know if this is a mobile OS problem or an application problem.

                In general, it is wise to ensure that all traffic entering the Internet from your devices can only emanate from IPs that are assigned to you. This is known as network ingress filtering, BCP38 aka RFC2827, and a good practice.
                Since pfSense generally only applies rules on inbound traffic, you would have to create a floating rule on the outbound WNA traffic, dropping anything NOT from your source subnet(s).

                –A.

                JKnottJ 1 Reply Last reply Reply Quote 1
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @msf2000
                  last edited by

                  @msf2000 said in How to block unknown IPv6 across tunnel:

                  My working theory is that a mobile device is switching from LTE to Wifi but keeping their old IPv6 address....

                  That would explain the traffic for sure. Normal rules should be limited to the X net anyway, default rule would block it if not allowed via a source NET rule..

                  If your not logging your default, or you have your allows open to more than what the source net would be on that interface.. Yeah you can turn on default logging, make sure your only allowing source.. Or sure create a specific blocking rule that logs..

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • JKnottJ
                    JKnott @msf2000
                    last edited by

                    @msf2000 said in How to block unknown IPv6 across tunnel:

                    I think matching specific IPv6 addresses to block is like holding back the ocean....

                    Here are my guest WiFi rules. They are very effective for both IPv4 and IPv6.

                    9892432c-bf67-4b4e-bd1b-0929eac0ffba-image.png

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • JKnottJ
                      JKnott @awebster
                      last edited by JKnott

                      @awebster said in How to block unknown IPv6 across tunnel:

                      I have seen this type of behavior before on my WLAN infrastructure whereby the device sends traffic from the LTE IP address but on the WiFi interface. I don't know if this is a mobile OS problem or an application problem.

                      Actually, this is entirely possible with Linux and Android is based on Linux. For example, I can specify the source interface and it's address will be used for the source. Another example, with my notebook computer, connected via WiFi, I can ping the WiFi address, even though it's connected via Ethernet. Other than desktop computers, just about everything is based on Linux, BSD or other *nix and I would expect them to behave the same way.

                      PfSense running on Qotom mini PC
                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                      UniFi AC-Lite access point

                      I haven't lost my mind. It's around here...somewhere...

                      1 Reply Last reply Reply Quote 0
                      • M
                        msf2000
                        last edited by

                        I'm cleaning up the rules now. I thought I would mention that I found this bug too:
                        https://redmine.pfsense.org/issues/11572

                        Basically, my IPv6 block lists we not working because the rule was set for IPv4 with IPv6 lists. :( Easy fix, but a sneaky bug for sure.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.