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

    Port forwarding for SMTP outgoing ?

    Scheduled Pinned Locked Moved NAT
    7 Posts 3 Posters 1.1k 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.
    • N
      netfab
      last edited by

      Hello,

      I'd like to get your help for the following scenario :

      ###########################
      Server –-Router----PFSENSE----INTERNET
      or
      Lan1----Lan2----PFSENSE----WAN

      As you have noticed , Lan1 is not directly attached to PFSENSE
      ###########################

      In this scenario, I want Server to be able to send SMTP (via TCP/587) to a Google Mail Server.
      I've already tried to create a PORT:FORWARD + Outgoing NAT rule but it doesn't work.
      in this way, Server is configured to forward smtp trafic to LAN PFSENSE IP interface.

      Is there any option to realize this operation ?
      Thanks in advance

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

        There is nothing shown as to why you can't just connect to the server.

        Going to need much more information about your network.

        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
        • N
          netfab
          last edited by

          Hello,
          I don't wish this server to have a direct access to Internet .

          which kind of other informations could help you ?

          Thanks in advance

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

            You don't want it to have direct access to the internet but you want it to access the internet.

            Not sure where you're going there.

            If all you want it to do is access google email on port 587, then use firewall rules so that is all it can do.

            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
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              If you have a downstream network from pfsense… Which take it from your ASCII art ;)  you do..

              You would need to setup for that in pfsense, and then in pfsense only allow this downstream IP to have access to the dest and port you want it to be able to talk too.  There would not be any sort of special outbound nat or port forwarding in such a setup.

              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

              1 Reply Last reply Reply Quote 0
              • N
                netfab
                last edited by

                Other option:
                Is there anyway to set PFSENSE as an SMTP relay (Need to install an add-on , like HAPROXY  ? Any other existing add-on ?)

                Thanks in advance

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

                  Perhaps. But firewall rules blocking everything but SMTP are far, far easier.

                  Either way it looks like you want this behavior on whatever Lan2/Router are in your "diagram" and not on pfSense.

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