DNS Resolver for 2 different web servers in the same lan
-
I have 2 different web servers on my LAN, how can i configure my dns resolver that on the basis of host names it forwards the traffic on the required server
incoming traffic will be WAN traffic. -
@justplayinn
A client in the internet does not respect your DNS resolver. He resolves the host names by using it's configured DNS servers and will get back your WAN IP. Hence he sends the request to this IP.
pfSense only sees the destination IP, not the host name. The name is only known at application layer.So if you have only one WAN IP, where the requests are send to, but you want to forward them to different servers behind based on host names, you need to look in the host header at L7. On pfSense this can be done with the HAproxy package.
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.