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

    NAT destination based on DNS?

    Cache/Proxy
    2
    2
    289
    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.
    • S
      Strahan
      last edited by

      Hi. Say I have a pair of DNS entries, say example1.domain.com and example2.domain.com. Both point to the same IP, but internally I need example1 to go to machine1 to serve HTTPS content and example2 to go to machine2 for the same. I normally just setup a NAT rule for port 80 to go to the machine, but in this case I have two destinations that use the same port.

      Is there any way for it to look at the host that was used and route based on that? Like host headers on a web server for example. I looked at source options but I didn't see anything that sounded like it'd be what I need.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        HAproxy will do that.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

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