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

    Simple GEO-IP test?

    Scheduled Pinned Locked Moved pfBlockerNG
    17 Posts 4 Posters 1.2k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator @focaccio
      last edited by

      @focaccio I can not help you figure out what is going on without seeing your rules. Also did you do the test, and then put in the block rule - if so a state would already exist and allow the traffic.

      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

      focaccioF 1 Reply Last reply Reply Quote 0
      • focaccioF
        focaccio @johnpoz
        last edited by

        @johnpoz understood thanks, will work on getting that uploaded. have to step away for a bit.

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

          @focaccio so here I just created an alias that contains brazil, added it to a rule that blocks. Checked that the table had networks in it..

          block.jpg

          If your trying to use the South America geoip, did you actually go in and select what countries you want included? And then validate the table populated. You might have to run the update in pfblocker, etc

          SA.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

          focaccioF 1 Reply Last reply Reply Quote 0
          • focaccioF
            focaccio @johnpoz
            last edited by

            @johnpoz thanks for those tips, i think the key piece was seeing i needed to use ALIAS NATIVE instead of what I had as DENY BOTH in the GeoIP part of blocker.
            It is working now:
            rules

            C:\Users\Greg>
            C:\Users\Greg>ping route-server.gvt.net.br
            
            Pinging route-server.gvt.net.br [200.146.0.1] with 32 bytes of data:
            Request timed out.
            Request timed out.
            Request timed out.
            Request timed out.
            
            Ping statistics for 200.146.0.1:
                Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
            
            C:\Users\Greg>
            
            GertjanG johnpozJ 2 Replies Last reply Reply Quote 0
            • GertjanG
              Gertjan @focaccio
              last edited by

              @focaccio

              Look also at what regex can do you.
              See here for more.

              I'm pretty sure you could filter for "dot cn" (thus the TLD).

              Be careful : this is a sledge hammer solution.
              Or like the missile that explodes even before you launch it.
              Be aware that most if not all "dot cn" sites also have their "dot com" equivalent, so block "dot com" also while you are at it 😊

              Personally, the method that worked best for me : as soon as I discover that I have devices (== users) on my networks that visit scary web sites, I lock them up in a full controlled network (captive portal or worse). From then on, I let them have it all : the crypto scammer soft, the spams, the viruses, the big total. This was known before as "let them learn" as thats works best. You'll do them a favor, believe me.
              Even if it takes time, people will notices that when they go to a site that includes stuff from other sites, (and so on) they will loose at the end. They will learn (as their device becomes unusable at the end / or they loose everything 'all the time').

              Btw : joke aside, this morning I was wondering : let's put a 'tarif' on it ? ^^ (sorry ...)

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

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

                @focaccio said in Simple GEO-IP test?:

                I had as DENY BOTH in the GeoIP part of blocker.

                I don't let pfblocker create any rules - that is another way to do it I guess. But I am not a fan of auto rules of any sort.. Oh a auto rule that allows dhcp when you enable dhcp is bit different then something that adds its own rule and what is in the rule, etc.

                But maybe that is just me, but I know this way works - and don't have to worry about where some auto rule might be placed in the rule set order, etc. Or if that could get mixed up sometime, etc.

                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

                focaccioF 1 Reply Last reply Reply Quote 0
                • focaccioF
                  focaccio @johnpoz
                  last edited by

                  @johnpoz quick follow-up here: why do i see only one object when trying to build a rule, but there is more than one object created?multiple-here-20241111A.JPG why-only-one-20241111A.JPG I rebooted after creating the second object just to make sure it "took".

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

                    @focaccio you can't assign those to your own rules - you need to use native alias if you want to be able to put them in your own rules.

                    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

                    focaccioF 1 Reply Last reply Reply Quote 1
                    • focaccioF
                      focaccio @johnpoz
                      last edited by

                      @johnpoz hi John, thanks again, still in (probably a long) orientation phase here, is there a simple way to describe (or documentation section) what the "Action" drop down options like native alias, match both, etc mean in the IP>GeoIP area of pfBlockerNG?

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

                        @focaccio only doc that I am aware of is

                        https://docs.netgate.com/pfsense/en/latest/packages/pfblocker.html#pfblocker-ng-package

                        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
                        • NogBadTheBadN
                          NogBadTheBad
                          last edited by

                          You can also click on the (i) for more info.

                          Screenshot 2024-11-13 at 15.38.53.png

                          Andy

                          1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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