I am attempting in effect to add Server=/example.com/ to the configuration of dnsmasq in order to route queries for example.com to a specific nameserver. To implement this I did the following.

  • I comment out the line dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf and restarted network-manager
  • I apt-get install dnsmasq
  • I edit /etc/dnsmasq.conf to my needs and restart dnsmasq

From my terminal, tests like host foo.example.com work correctly. But all applications (e.g. Firefox, midori, remmina) seem to use the "old" settings (that is I see DNS queries go out and fail with tcpdump). I am lost how to merge automagic and manual settings like this.

EDIT: Meanwhile I have even tried unusual and desparate measures (e.g., rebooting) without success. Also it seems that the distinction is not reminal vs. other apps. Rather even in a single terminal session I observe

#host foo.example.com
foo.example.com has address
#ping foo.example.com
ping: unknown host foo.example.com

Ultimately,this led me to the solution. And admittedly this is an example where exaggerated anonymization made the question unanswerable: My domain in question is actually a subdomain of .local, which mdns steals away from proper dns. Editing /etc/nsswitch.conf solved the problem.


Edit /etc/nsswitch.conf so that the hosts line is

hosts: files dns mdns4
| improve this answer | |

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.