What's new

Correct DNSMASQ syntax?

  • 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!

Kian

Occasional Visitor
I am trying to figure out what the correct syntax is for the following in my dnsmasq.conf.add file. It's to set a different DNS server for a specified device, but have all other devices use a different DNS server:

Is this correct:

Code:
dhcp-option=6,192.168.1.67

dhcp-option=tag:mydns,option:dns-server,8.8.8.8
dhcp-host=00:11:32:XX:XX:XX,set:mydns

Os it this correct:

Code:
# Google DNS
dhcp-option=tag:googlesdns1,6,8.8.8.8
dhcp-option=tag:googlesdns2,6,8.8.4.4

# NAS set to Google DNS
dhcp-host=00:11:32:XX:XX:XX,set:googledns1

Os is neither correct? What should I use?

Thank you.
 
Both examples appear to be the same :confused:. The only difference is that in the first example you're using the tag "mydns" and in the second it's called "googledns1"?

You could just use the DNS Filter feature in the router's web interface.
 
DNSFilter does not work for me. I set 2 devices to use custome 2 which is set to 8.8.8.8. But when I check the DNS settings on the devices, they are pulling DNS from 192.168.1.67 which is my catch all in my dnsmasq. DNSFiler has never worked for me and I have no idea why.
 
DNSFilter does not work for me. I set 2 devices to use custome 2 which is set to 8.8.8.8. But when I check the DNS settings on the devices, they are pulling DNS from 192.168.1.67 which is my catch all in my dnsmasq. DNSFiler has never worked for me and I have no idea why.
DNS Filter doesn't work that way. It intercepts the DNS requests on-the-fly and redirects them to the desired server (8.8.8.8 in your case). As far as the client is aware, it still thinks the requests are going to the "normal" DNS server. They're not.
 
DNS Filter doesn't work that way. It intercepts the DNS requests on-the-fly and redirects them to the desired server (8.8.8.8 in your case). As far as the client is aware, it still thinks the requests are going to the "normal" DNS server. They're not.

I see. Well there is still one problem: When I set my Routers LAN DNS settings to 192.168.1.67 and change Global Filter mode setting in DNSFilter to Router, it stops internet access. That DNS Server is my pi hole. If I add a dnsmasq entry instead it works. But with just DNSFilter it doesn't.
 

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