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

    Block SMTP on LAN besides Mail server

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 3 Posters 8.4k 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.
    • H
      htech
      last edited by

      What's the best way to block smtp on a lan (besides the actual mail server)? We got hit and a user started sending spam out. We caught it right away but got bl. In Pfsense I created an alias called mailservers. Then defined the machines by their ip. In the LAN firewall tab I created a rule that blocks port 25 except the alias list. I have the rule before any allows but it still doesn't block smtp. I setup an smtp server on a workstation to see if it would be blocked and it can still send off emails. I know I'm missing something.  I tried searching the forum and while I do see some talk on how to do this I don't see any specific examples. To date we have just had the allow all outgoing but I think it's too dangerous so I need to start limiting what goes out.

      1 Reply Last reply
      Reply Quote 0
      • chpalmerC
        chpalmer
        last edited by

        Outbound rules:

        Lan Subnet to Wan port 25 to mail server IP.  Allow.

        Lan Subnet to Wan port 25 any.    Block.

        Should work.

        Triggering snowflakes one by one..
        Primary- Intel(R) Pentium(R) CPU G4400 @ 3.30GHz on an M470 WG box. pfsense+ 26.07

        1 Reply Last reply
        Reply Quote 0
        • H
          htech
          last edited by

          Thanks for the reply. I will see if that will work.

          1 Reply Last reply
          Reply Quote 0
          • C
            cmb
            last edited by

            Should be LAN to any on both those, not to WAN, otherwise correct.

            1 Reply Last reply
            Reply Quote 0
            • H
              htech
              last edited by

              Thanks! That worked perfect.

              1 Reply Last reply
              Reply Quote 0

              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