Using dnsmasq, loopback works but local clients don’t

dnsmasqdomain-name-systemmac-osx

I just finished configuring dnsmasq on a local machine and it seems to work fine when resolving domains using itself. When I point another machine on the network to use the dnsmasq machine as its sole DNS server, I can't get any domain to resolve at all.

My config files look like this (am I missing something?):

resolv.conf

nameserver 127.0.0.1

dnsmasq.conf

# resolv File
resolv-file=/etc/resolv.conf

# DNS Servers
server=131.191.7.5
server=131.191.7.12

# Domain Overrides
address=/mydomain.com/192.168.2.253
address=/one.mydomain.com/192.168.2.253
address=/two.mydomain.com/192.168.2.253
address=/thismachine.local/192.168.2.253

When I run "sudo lsof -i | grep LISTEN" I can see dnsmasq listening on port 53:

dnsmasq   189         nobody    4u  IPv4 0x05bf8338      0t0    TCP localhost:domain (LISTEN)
dnsmasq   189         nobody    6u  IPv6 0x05bf31f0      0t0    TCP uberserve.local:domain (LISTEN)
dnsmasq   189         nobody    8u  IPv6 0x05bf2f80      0t0    TCP localhost:domain (LISTEN)
dnsmasq   189         nobody   10u  IPv6 0x05bf2d10      0t0    TCP localhost:domain (LISTEN)

Best Answer

What's your firewall look like on the dnsmasq box?

Check inbound port 53.

Run a packet trace on your new dnsmasq box on port 53 and see what's happening.

You can force a client to use your dnsmasq box like so:

dig www.google.com @dnsmasboxip

Related Topic