Dnsmasq authoratative only for single host

Started by nintendoeats, November 07, 2026, 07:59:05 PM

Previous topic - Next topic
Bonjour,

I am using Dnsmasq for both DNS and DHCP. All has been well so far, but now I want to globally override a public server with my own mirror. Problem is, I am not mirroring the whole domain, only part of it. I would like to prevent upstream requests for bar.foo.com and baz.foo.com, but not *.foo.com like the Local option does.

I'm getting the impression that this behaviour is just outside the scope of Dnsmasq, and that the expectation is you will set up a different nameserver to differentiate these queries. Am I mistaken?

Thanks

Host overrides should have a higher priority than domain overrides.

Try the following:
- Add a domain override for bar.com with the IP address 8.8.8.8
- Add a host override for foo.bar.com with, for example, 192.168.1.1

It worked here in a quick test.
Since my internal domain is internal.bar.com, this behavior might not be directly applicable.
(Dnsmasq is still a mystery to me.)

Quote from: stefanpf on <strong>Today</strong> at 06:08:10 AMTry the following:
- Add a domain override for bar.com with the IP address 8.8.8.8
- Add a host override for foo.bar.com with, for example, 192.168.1.1

Thanks, that worked! I did have to assign an IPv6 address to the local server, and there is still an alias record appearing, but I'm sure I can resolve that too.

One day, in the far flung future, when I change my DNS setup and forget about this entry, I will be wondering why I can access every website except for foo.com...