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

    How to Forward all outbound mail port 25 using Outbound Nat to a local IP address on port 26 to Proxmox Mail Gateway

    Scheduled Pinned Locked Moved NAT
    1 Posts 1 Posters 832 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.
    • xanaroX
      xanaro
      last edited by xanaro

      I am running Proxmox Mail Gateway, it is an email filtering product.

      The inbound Nat rule is straight forward, just forward any traffic from port 25 to the local ip of your proxmox mail gateway. (Most people know how to do an inbound Nat rule so I wont cover that here.)

      Previously I had configured All local mail servers to use the proxmox mail gateway as a relay host. This outbound Nat rule makes that no longer necessary.

      The below is how to make sure outbound mail also goes through the proxmox mail gateway. Take any traffic port 25 that did NOT originate from the proxmox mail gateway, and forward it to the proxmox mail gateway.

      PMG is a firewall Alias

      Navigate to: Firewall > Aliases > IP, type Hosts.

      Outbound Nat Proxmox Mail Gateway

      Navigate to: Firewall > NAT > Outbound, select Manual Outbound NAT rule generation.

      Outbound Nat Proxmox Mail Gateway

      Incase the pictures go down, heres the outbound nat rules in text format:

      WAN  PMG   * 	* 	25 (SMTP)   WAN address  *   PMG to WAN
      WAN  PMG   25 (SMTP) 	* 	*   WAN address  *   PMG to WAN
      WAN  any   * 	* 	25 (SMTP)   PMG 	 26  All port 25 to PMG:26
      WAN  any   25 (SMTP) 	* 	*   PMG 	 26  All port 25 to PMG:26
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.