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

    Multi Host Alias & NAT

    Scheduled Pinned Locked Moved NAT
    7 Posts 2 Posters 2.8k 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
      NOYB
      last edited by

      When a firewall alias with multiple hosts is used as the NAT IP (LAN target) in a NAT port forward rule what determines which host IP is forwarded too?

      Have a machine that is sometimes on LAN and sometimes on WLAN (WiFI).  So alias is configured with both.  How does the NAT select which one to forward too?

      Thanks

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I was thinking that pf would do a round-robin forwarding in that case. Each connection would go to the next IP in the list.

        The pf.conf man page seems to agree.

        RDR ROUND ROBIN

        # Translate incoming web server connections to a group of web servers on
            # the internal network.
            rdr on $ext_if proto tcp from any to any port 80
                  -> { 10.1.2.155, 10.1.2.160, 10.1.2.161 } round-robin

        But that has the round-robin keyword (which may also be an assumed default in that case)

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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

          What about when one of the hosts is down?  Would the round-robin skip it?

          Have been using this (multi host alias) with RDP NAT/Firewall rule to a machine that has both LAN and WLAN connection.  But only one active at any given time.  Seems that it should fail to connect every other time unless intelligent enough to skip the offline host.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I don't think rdr is smart enough to do that. You'd need relayd involved if you want to stop using a down host.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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

              @jimp:

              I don't think rdr is smart enough to do that. You'd need relayd involved if you want to stop using a down host.

              That's not what I meant (rdr being smart enough).  Meant pfSense round-robin being smart enough to detect and skip NATing to an offline host that is a member of a multi-host alias.

              UPDATE:
              Just did some quick crude testing and does seem to round-robin and not smart enough to detect and skip an offline host.

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Those two are the same thing. round-robin in an rdr is all pf. It's not smart enough to detect a down host and we don't actively check that.

                That's what relayd is for :-)

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

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

                  Oh my bad.  Read rdr as rdp.  :-[

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