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

    How do I block visitors by country using IP address ranges?

    Scheduled Pinned Locked Moved pfBlockerNG
    4 Posts 2 Posters 791 Views 2 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.
    • W
      wbmstr2000
      last edited by

      I want to block traffics from a certain country. I know I can export and save a free IP address list from firewall generator and one of the common CIDR output format is as below.

      What should I do next to import the list to enable blocking in pfSense? I don't want to enter it manually.

      # -------------------------------------------------------
      # Free IP2Location Firewall List by Country
      # Source: https://www.ip2location.com/free/visitor-blocker
      # Last Generated: 19 Nov 2018 04:57:38 GMT
      # [Important] Please update this list every month
      # -------------------------------------------------------
      217.29.232.0/21
      194.112.14.0/24
      194.112.13.128/25
      194.112.13.64/26
      194.112.13.32/27
      194.112.13.16/28
      194.112.12.0/24
      
      1 Reply Last reply
      Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        You probably want the pfBlockerNG package.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply
        Reply Quote 0
        • W
          wbmstr2000
          last edited by

          How do we use the pfBlockNG package?

          1 Reply Last reply
          Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            https://www.youtube.com/watch?v=g0KOcfGicjM

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply
            Reply Quote 1

            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