Port forwarding for SMTP outgoing ?



  • 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


  • Netgate

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

    Going to need much more information about your network.



  • 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


  • Netgate

    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.


  • Rebel Alliance Global Moderator

    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.



  • 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


  • Netgate

    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.