What's new

DNS Masq override dns entry question

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

chufi

Occasional Visitor
I followed the instructions and it seems to work when I am ssh'ed into the router, (foo.com => 192.168.1.2 lovely) but my mac is not using the router for dns. If I look in the macs network preference => advance, the DNS list says 192.168.1.1 which seems like what I want - but if I do
scutil --dns it just shows the two dns servers from my ISP .

So I'm a little stumped at the moment.

EDIT:
If I do nslookup foo.com 192.168.1.1 I still get the external IP address.
 
Last edited:
I followed the instructions...
What instructions? What router? What firmware version?

If I look in the macs network preference => advance, the DNS list says 192.168.1.1 which seems like what I want - but if I do
scutil --dns it just shows the two dns servers from my ISP .
TBH this sounds like a Mac issue rather than anything to do with the router.
 
Instructions https://github.com/RMerl/asuswrt-merlin/wiki/Custom-domains-with-dnsmasq
384.3 on RT-AC86U

The only thing I am thinking might be an issue is that the mac is still getting the upstream dns servers, which I didn't think would be even sent to the dhcp client - but maybe I'm missing something about how this is supposed to work. I've tried flushing DNS caching on the mac and restarting the mac, but it still has the upstream providers as DNS.
 
Can you post the output of the following command (on the router):

cat /etc/dnsmasq.conf
 
pid-file=/var/run/dnsmasq.pid
user=nobody
bind-dynamic
interface=br0
interface=pptp*
no-dhcp-interface=pptp*
no-resolv
servers-file=/tmp/resolv.dnsmasq
no-poll
no-negcache
cache-size=1500
min-port=4096
dhcp-range=lan,192.168.1.2,192.168.1.254,255.255.255.0,86400s
dhcp-option=lan,3,192.168.1.1
dhcp-option=lan,6,192.168.1.1
dhcp-option=lan,252,"\n"
dhcp-authoritative
address=/one.foo.com/192.168.1.2
address=/two.foo.com/192.168.1.2
 
I can't see anything wrong there. Your Mac isn't getting the upstream DNS servers from the router.

Have you got any other devices you can check with.
EDIT:
If I do nslookup foo.com 192.168.1.1 I still get the external IP address.
Is that a mistake? That command won't work from your example, you'd need to do:

nslookup one.foo.com 192.168.1.1
 
Hmm that could be an mistake with nslookup, I thought it was

nslookup host_I_am_looking_up optional_dns_server_I_want_to_use

And sure enough, dns on my android phone resolves to the local server....wtf mac? Thanks for checking it out, if I work out what the deal with the mac is I'll try to post the answer
 
Hmm that could be an mistake with nslookup, I thought it was

nslookup host_I_am_looking_up optional_dns_server_I_want_to_use
That is correct. But in your post you used "foo.com" which is a domain, not "one.foo.com" which is the host that you specified in dnsmasq.
 
Oh yeah, those were just made up examples vs the complicated domain I was really using. I did figure it out, vpn was changing the dns around when it would autoconnect. Doh. Pretty obvious in retrospect.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top