pfSense, HAProxy and DNS Resolver

Hi all,

Checking my understanding of the DNS Resolver behaviour when using HAProxy. Followed @LTS_Tom videos on YouTube on setting this up and trouble shooting (awesome videos, many thanks) but despite this could not getting it working for an internal homelab setup only.

Finally (I think) I found and fixed the problem - If I have checked ‘register DHCP static mappings in DNS Resolver’ in Services>DNS Resolver>General Settings then I always get the static IP of my server (a Synology NAS in this case). If I unselect this, and then clear the browser data HAProxy does its thing.

Does this mean that the static DHCP mapping takes precedence over the host override in the DNS Resolver?

Appreciate anyone’s views on this (as I’m still learning and want to understand a little more about this issue). I had assumed a host override would take priority as if I have understood it correctly, this will have implications for all my other static mappings in the DNS resolver(?)

Thanks all

Not a 100% sure, but seems like it. But that shouldn’t really matter, because in a HA Proxy scenario, you either don’t use the DNS Registration for DHCP mappings, or you are going to use different FQDNs for the HA Proxy frontend and the server in the backend. Otherwise, DNS would announce two different IPs for the same FQDN, which cannot work, for obvious reasons.


Your got a physical server, IP:, hostname; nas01 → Static mapping registration creates a DNS record for in Unbound → DNS record points to, the IP of the physical server.

After that, you create a frontend in HAProxy, on e.g., and a DNS host override for the same FQDN ( that is already pointing to, but this time you point it to, because you want HAProxy to handle the requests.

Now Unbound has a problem, because it doesn’t know what to answer when a client requests the IP for… So I guess, it has to prioritize one over the other, somehow… :wink:

1 Like

Thanks @bb77 - appreciate the response and example. That all makes sense to me and in that example, when I nslookup, Unbound returns me both entries in DNS, but it returns the static mapping before the host override (which explains why I got stuck in my HAProxy setup).


1 Like