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

    VIP & NAT

    Scheduled Pinned Locked Moved HA/CARP/VIPs
    vipnatmail
    3 Posts 2 Posters 2.0k 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.
    • A
      Alek
      last edited by

      Hello there,

      I have a pfsense box set up like that :

      • default gateway 10.x.x.13/29
      • VIP 10.x.x.14/29
      • VIP 10.x.x.15/29

      I'm trying to set up a mail server on my 10.x.x.14 IP. I setup NAT on all necessary port (25/993/143/995/587) between my host and my VIP 10.x.x.14.
      My mail server webpage is working when I access the domain name.

      But when I send a mail to test my score with mail-tester.com , I get an error saying my SPF only allow 10.x.x.14 and I'm using 10.0.0.13.

      Also, I can send emails but I'm not receiving anything...

      Did I did my networking correctly ? Do I have to do 1:1 NAT instead of port forward ?
      Why I'm seeing my default GW instead of my VIP ?

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @Alek
        last edited by

        @alek
        Yes, best practice for this is to configure NAT 1:1 for the server instead.

        Add an 1:1 rule to WAN, enter the VIP at external address and the servers IP with a /32 mask at internal.

        You have to add separate firewall rules to WAN with the server IP as destination to allow incoming access on the desired ports.

        Instead of this you can also add an outbound NAT rule for the source of the server and set the VIP as translation address, if you want to keep the port forwardings.
        Remember that you have to switch the outbound NAT to hybrid mode.

        A 1 Reply Last reply Reply Quote 0
        • A
          Alek @viragomann
          last edited by

          @viragomann
          Thanks !
          Went with the port forward + outbound option, NAT is working finally.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.