Is it possible to perform Split-horizon with DNSMasq? I've googled and it seems like it is only possible with Bind9, any advice would be much appericated

  • dnsmasq is just a caching resolver, go bind9 – Rui F Ribeiro Nov 29 '15 at 8:03
  • not quite correct. dnsmasq isn't as full-featured a nameserver as, say, bind9 or nsd but it is capable of being an authoritative nameserver. – cas Nov 29 '15 at 9:37

I'm not quite sure what you mean by "split horizon".

You can, however, configure dnsmasq to resolve names for a certain domain through a dedicated name server (quoting from the documentation):

Using special servers.

Dnsmasq has the ability to direct DNS queries for certain domains to specific upstream nameservers. This feature was added for use with VPNs but it is fully general. The scenario is this: you have a standard internet connection via an ISP, and dnsmasq is configured to forward queries to the ISP's nameservers, then you make a VPN connection into your companies network, giving access to hosts inside the company firewall. You have access, but since many of the internal hosts aren't visible on the public internet, your company doesn't publish them to the public DNS and you can't get their IP address from the ISP nameservers. The solution is to use the companies nameserver for private domains within the company, and dnsmasq allows this. Assuming that internal company machines are all in the domain internal.myco.com and the companies nameserver is at then the option server=/internal.myco.com/ will direct all queries in the internal domain to the correct nameserver. You can specify more than one domain in each server option. If there is more than one nameserver just include as many server options as is needed to specify them all.

So you can try to add something like


to your configuration.

You might not be affected, but anybody trying to configure their dnsmasq on modern desktop systems might soon realise that NetworkManager is spawning dnsmasq. The configuration is clobbered together from files in /etc/NetworkManager/dnsmasq.d/.

  • 1
    I'm not quite sure why you answer while you have not understood the question - especially as split horizon DNS is a single Google search away. – ssc Mar 19 '17 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.