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

    pfBlockerNG blocking SMTP (country blacklist)

    Scheduled Pinned Locked Moved pfBlockerNG
    3 Posts 3 Posters 469 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.
    • M
      MatthiasVD
      last edited by MatthiasVD

      Hi!

      I currently have pfBlockerNG set up. I run my own mailserver at home, I have IMAP/SMTP exposed to the internet.

      I have configured pfBlockerNG to block all connections that do not originate from my home country to these open ports. This works perfectly fine, except that I am having an issue with SMTP. Only mail servers located in my country can send mail to my on-prem mail server. I have messed with the "Rule order" setting on pfBlockerNG, but it's either blacklist all ports or whitelist all ports. There is no option to have a single exception for SMTP. I have looked at some old forum posts, found documentation online but nothing was able to help me out.

      If cron updates, the firewall rules are ordered like this:
      0457aae2-1ccf-4a20-a855-7f1c5b41a529-image.png

      I would like them to be ordered like:
      3ac12f5a-a3d8-4911-ac2a-c3b4f2e21020-image.png

      Is there any way to achieve this?

      TIA!

      Bob.DigB S 2 Replies Last reply Reply Quote 0
      • Bob.DigB
        Bob.Dig LAYER 8 @MatthiasVD
        last edited by Bob.Dig

        @matthiasvd Make an alias permit instead and put that alias as source in your IMAP rules, if you really need these public available.

        Screenshot 2022-09-03 215342.png

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

          @matthiasvd said in pfBlockerNG blocking SMTP (country blacklist):

          There is no option to have a single exception for SMTP

          When I use pfB, I use Alias Native. That creates the alias and no rules. Then you can use the alias in a NAT or firewall rule as desired.

          BTW, it's more efficient to allow Europe than block not-Europe. (less memory usage and time looking through the IPs)

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