How can I forward configure my local dnsmasq so requests with hostnames ending with .docker are forwarded to another nameserver, while other requests are still handled locally ?

I have looked for an /etc/dnsmasq.conf file on my system but could not find it (only a dnsmasq.d directory).

EDIT : apparently, dnsmasq is run by network manager, like this :

/usr/sbin/dnsmasq --no-resolv --keep-in-foreground
--no-hosts --bind-interfaces
--cache-size=0 --proxy-dnssec

In dnsmasq.conf


This would forward all requests looking for TLD .docker to Not sure why your dnsmasq.conf is missing. What distribution are you using?

  • I think I know why : I'm using ubuntu, and dnsmasq is started by network manager. There also is a /etc/NetworkManager/dnsmasq.d directory used in the dnsmasq command. I edited my question to show the command. – greg0ire Aug 5 '15 at 12:58
  • Putting a file named "docker" with this in this directory seems to work when I kill dnsmasq and run it again by hand. I'm going to try a reboot to see if if works after reboot. – greg0ire Aug 5 '15 at 13:03
  • Also: askubuntu.com/questions/155716/… – duenni Aug 5 '15 at 13:04

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.