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

    Multi WAN & Mail Servers

    Scheduled Pinned Locked Moved Firewalling
    6 Posts 2 Posters 653 Views 2 Watching
    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 Offline
      Alek
      last edited by

      Hi everyone,

      I've added another gateway to my Pfsense with 5 VIP.
      I already had one GW with 5 VIP. So my network look like this :
      WAN 1 => Public IP + 5 VIP (wan1.x.x.1 , wan1.x.x.2 ...)
      WAN 2 => Public IP + 5 VIP (wan2.x.x.1 , wan2.x.x.2 ...)

      I have 2 mails servers on my WAN 1 VIP running smoothly for months.
      This week, I've added one mail server on WAN 2 VIP and got some problems to make it works, but now it's working.

      My last problem is that all servers can email Google, Microsoft with no problem but the servers can't email each others.

      Here some screenshots of my config :
      Untitled.png

      My WAN 1 Rules :
      709ee8ae-bfd3-4615-b3d7-e92e34ea3d62-image.png

      My WAN 2 Rules :
      7a76026a-0ca8-4d57-a29d-5501ce6b23f0-image.png

      My DMZ Rules : (All three servers are in the DMZ, 10.10.3.83 is the new on WAN 2)
      d5c42056-21b6-4ef5-beea-dba0394cf5d8-image.png

      My iRedMail Aliases :
      b41af24a-70a3-4e3b-9787-6789861355a7-image.png

      My NAT Port Forward Rules :
      Untitled2.png

      My NAT Outbound :
      Untitled3.png

      When I try to email 10.10.3.80 on WAN 1 via 10.10.83 on WAN 2 I get:

      mail postfix/smtp[3996]: connect to mail.DOMAIN2.tld[wan1.x.x.3]:25: Connection timed out
      mail postfix/smtp[3995]: 4P3cDH1QcVz2R: to=<test@DOMAIN2.tld>, relay=none, delay=1515, delays=1485/0.08/30/0, dsn=4.4.1, status=deferred (connect to mail.DOMAIN2.tld[wan1.x.x.3]:25: Connection timed out)
      

      To send emails, I'm using Thunderbird, connected on port 587.

      Any idea, what I'm missing ?

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

        @alek
        Either add host overrides for your mail servers and point them to their internal IP or exclude your WAN1 subnet from the policy routing rule for the new mail server and enable NAT reflection in the NAT rules.
        0a24b79c-a7fc-42d1-b703-4f4aa9f54aca-grafik.png

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

          @viragomann
          Thanks ! Did add a host override for all my email servers like this :
          Untitled4.png

          Now they can email each others internally.
          #################################################################################################

          • 2nd question, why can't they talk to each other externally ? What did I miss in my rules ?

          #################################################################################################

          • 3rd question, while looking into my NAT rules, found out that all of them have NAT Reflection disabled by default.

          d19b6e9d-ca9d-4d99-8dc1-7e4a25bbfd7d-image.png

          My default setting :
          dcbd2d94-cb36-402a-a3d0-eee54c7b9687-image.png

          Not sure if I really understand this setting, what's the recommended way of doing it ?

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

            @alek said in Multi WAN & Mail Servers:

            2nd question, why can't they talk to each other externally ? What did I miss in my rules ?

            The firewall rule for passing the traffic from 10.10.3.83 to anywhere directs all matching packets to the WAN2 gateway, since you stated it in the rules advanced options. Hence also the traffic to WAN1.
            This doesn't work with default settings. It might run into asymmetric routing issues.
            Even if the packets are routed from WAN2GW to your WAN1 interface, response packets to the WAN2 IP won't be routed back to the gateway again, since the destination IP is assigned to interface of pfSense itself.

            3rd question, while looking into my NAT rules, found out that all of them have NAT Reflection disabled by default.

            As you have already defined host overrides, you don't need NAT reflection anymore. Host overrides are the more reliable solution.

            With the host override, when the one mail server needs to access another one, it gets the internal local IP address from the DNS and hence sends the packets to it directly. The traffic doesn't pass pfSense, since both devices are within the same network segment.
            So also the policy routing rule doesn't matter then.

            NAT reflection means, that the NAT rules, which you have assigned to WAN interface, is also applied on the other pfSense interfaces. So if the device tries to access a WAN1 IP it is redirected to the internal IP is well.
            Without that, internal requests to any of your WAN IPs are not redirected.

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

              @viragomann

              I've edited my DMZ rules to look like this :
              41fff429-938a-4410-bcdb-954249d088fd-image.png

              What should I change then to match what you said ?

              Thanks.

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

                @alek
                Not clear, what you try to achieve now or what you're missing.
                As you stated above, you want certain host to go out on WAN2 and the others on WAN1.
                So assuming WAN1 is your default gateway, add all IPs, which should use WAN2 to the GW2_IPOUT alias and it should do that.

                The second rule is applied to all other IPs then. The third one is not needed anymore.

                Of course you still need the rule for allowing DNS access to pfSense without any gateway stated.

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