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

    Block: Russian & Belarus IPs

    Scheduled Pinned Locked Moved Firewalling
    6 Posts 5 Posters 1.9k 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.
    • B
      bradf1405
      last edited by

      HOW TO BLOCK RUSSIAN & BELARUS IP ADDRESSES

      If you want to block Russian & Belarus IPs on your pfSense Firewall, follow these simple instructions:

      • Create an IP Alias with Russian_Belarus_IPs see attached file Russian_Belarus_IPs.txt

      • Create either a Floating Firewall Rule or a WAN Firewall Rule to Block incoming Russian_Belarus_IPs. Don't forget to set protocol to ANY.

      I used a Floating Rule using Block, "Quick", Direction "Both Ways", Protocol "ANY" and using Russian_Belarus_IPs Alias as the source IP addresses. You could do the same with a WAN Ingress Block Firewall Rule. You could also add a LAN outgoing Block Rule so you can't also get out to any Russian/Belarus websites to just be extra secure.

      Enjoy and stay safe!
      Brad Francis.

      bingo600B johnpozJ 2 Replies Last reply Reply Quote 0
      • bingo600B
        bingo600 @bradf1405
        last edited by

        @bradf1405
        That's 9.5 /16 = 622592 IP's

        I would have expected more ip's allocated to them

        /Bingo

        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

        pfSense+ 23.05.1 (ZFS)

        QOTOM-Q355G4 Quad Lan.
        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

        P 1 Reply Last reply Reply Quote 0
        • P
          pyrodex @bingo600
          last edited by pyrodex

          @bingo600 said in Block: Russian & Belarus IPs:

          @bradf1405
          That's 9.5 /16 = 622592 IP's

          I would have expected more ip's allocated to them

          /Bingo

          It is WAY too small, check out https://www.countryipblocks.net/acl.php

          You can create an importable Alias list and select countries. I just wish they summarized it more where possible.

          Update: Using https://raw.githubusercontent.com/grelleum/supernets/master/supernets.py gets it down to 8000ish subnets which is way more manageable.

          bingo600B 1 Reply Last reply Reply Quote 1
          • bingo600B
            bingo600 @pyrodex
            last edited by bingo600

            @pyrodex
            I got 8010 CIDR subnets when optimizing with the supernet (from 22K)

            Nice links

            But remember ...
            The bad guyzz do know how2 order a VPS in another country.
            And i suppose they also know what a VPN is.

            /Bingo

            If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

            pfSense+ 23.05.1 (ZFS)

            QOTOM-Q355G4 Quad Lan.
            CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
            LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

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

              @bradf1405 you could also just use pfblocker

              pfblocker.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
                crucialguy @johnpoz
                last edited by crucialguy

                @johnpoz second this.

                Best method to do blocking of this nature, you don't have to fiddle around worrying about keeping it up to date either as PfBlocker will check those lists for you.

                Get pfblocker, sign up to MaxMind and away you go. Automated and dynamic, exactly how networking should be!

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