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

    pfBlockerNG - GeoIP "Allow USA" doesn't match some IPs

    Scheduled Pinned Locked Moved pfBlockerNG
    8 Posts 3 Posters 963 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.
    • C
      ctarbet
      last edited by

      I have an explicit deny at the end of my rules, plus an "Allow USA" rule right above it based on a custom IPv4 GeoIP list.

      geoip2.PNG

      geoip1.PNG

      It generally works, but many USA addresses are not matched by my pfBlockerNG list and rule.

      geoip3.PNG

      It is typically various random CDN servers like Microsoft, Google, CloudFlare, etc.

      geoip4.PNG

      It seems so straightforward to me... there must be something I don't understand about how to properly create a GeoIP list like this.

      1 Reply Last reply Reply Quote 0
      • C
        ctarbet
        last edited by ctarbet

        Here's another example - Google in the US doesn't match my rule allowing GeoIP US list.

        geoip5.PNG

        geoip6.PNG

        S 1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @ctarbet
          last edited by

          @ctarbet this gets asked from time to time. MaxMind I believe updates monthly? The big guys buy or move IP blocks from other countries. MS announced that like 10-15 years ago or so. Other than trying to get MaxMind to correct it not sure there’s much to be done.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          C 1 Reply Last reply Reply Quote 0
          • C
            ctarbet @SteveITS
            last edited by

            @SteveITS I understand what you are saying, but the website says that they are US. Does pfBlocker Geo data lag behind what the MaxMind website shows?

            I even get Apple ranges in there sometimes and they've owned their chunk forever.

            geoip7.PNG

            Is there any way to see the contents of my USA GeoIP alias within pfSense?

            Can I hard-delete whatever MaxMind stuff I have and redownload?

            S johnpozJ 2 Replies Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @ctarbet
              last edited by

              @ctarbet Diagnostics/Tables will list the alias contents.

              Also ensure you don’t have deduplication enabled. That can have unexpected results sometimes.

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

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

                @ctarbet Your block your showing is out of state.. See the FA, that is a Fin,Ack.. So yeah it would be blocked if the state has already been closed.. This has nothing to do with the IP not being in your allow list.

                outofstate.jpg

                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

                C 1 Reply Last reply Reply Quote 0
                • C
                  ctarbet @johnpoz
                  last edited by

                  @johnpoz I'm not sure if all my problem packets are FA, but I'll delve into that.

                  Why does a packet in FA skip my allow rule, but hit my custom reject all rule? I can feel a potential knowledge gap on my part here and it will help me in general to understand that difference, thank you.

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

                    @ctarbet pfsense is a stateful firewall. states are created by SYN packets.. If there is no state to allow traffic, then it would be blocked.

                    https://docs.netgate.com/pfsense/en/latest/troubleshooting/log-filter-blocked.html#troubleshooting-blocked-log-entries-for-legitimate-connection-packets

                    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
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.