1

I want to use dnsmasq to specify some DNS name server for some domains (e.g. google) in /etc/dnsmasq.conf, server=/www.google.com/8.8.4.4. For the rest of the domains still use 127.0.0.1 which is defined in /etc/resolv.conf.

But I found when I run nslookup manually, nslookup still used 127.0.0.1 rather than using 8.8.4.4

root@root:/home/root# nslookup www.google.com
Server:     127.0.0.1
Address:            127.0.0.1#53

Non-authoritative answer:
Name:   www.google.com
Address: 74.125.128.106
Name:   www.google.com
Address: 74.125.128.103
Name:   www.google.com
Address: 74.125.128.147
Name:   www.google.com
Address: 74.125.128.105

What is wrong with my configuration?

My NetworkManager.conf is :

[main]
plugins=ifupdown,keyfile

**#dns=dnsmasq**

[ifupdown]
managed=true

Thank you very much in advance!

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83

1 Answers1

1

There's nothing wrong with this configuration. 127.0.0.1 is the address of your local dnsmasq. When you tell nslookup to look up google, it asks 127.0.0.1 (which is your dnsmasq), and then dnsmasq forwards that query to 8.8.4.4.