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

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

    Scheduled Pinned Locked Moved pfBlockerNG
    4 Posts 2 Posters 490 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.
    • 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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.