Help setting unique dns entry for specific device

I'm new and don't know exactly what I'm doing yet so bear with me.

I've been doing all configuration with Luci and it works great but now I want to do something that seems is only possible via SSH.

I tried running these commands.
The idea is to tag the device and then route that tag through a different dns address.

  • 00:04:4B:B1:70:BB is the device MAC address.
  • 192.168.1.8 is the LAN address assigned to the device (not sure if this is required or not).
  • smartdnsproxy is the tag/label I decided to use.
dhcp-host=00:04:4B:B1:70:BB,set:smartdnsproxy,192.168.1.8
dhcp-option=tag:smartdnsproxy,option:dns-server 67.231.17.253

However, when I run the command I get...

-ash: dhcp-host=00:04:4B:B1:70:BB,set:smartdnsproxy,192.168.1.8: not found

I'm certain I'm doing the dnsmasq command incorrectly. How do I do it?

Thanks!

Those two lines are not commands you can execute, those are configuration lines, that you must add to "/etc/dnsmaq.conf". Try to execute this:

echo "dhcp-host=00:04:4B:B1:70:BB,set:smartdnsproxy,192.168.1.8" > /etc/dnsmasq.conf
echo "dhcp-option=tag:smartdnsproxy,option:dns-server 67.231.17.253" > /etc/dnsmasq.conf
1 Like

Those look to be dnsmasq config settings. Take a look here DHCP & dnsmasq

1 Like

Thanks guys.

I was able to SSH using WinSCP and edit the dnsmasq.config directly. However, once my settings were added dhcp stopped working completely. None of the clients were handed IP addresses.

Where am I going wrong? This seems like a pretty easy setting/approach.

Thanks again! :+1:
Jeremy

You can enable logging on dnsmasq, and see the queries from the clients and the responses from the server. Also, watch the logs while you restart the service.

Agreed with @eduperez , best to turn on logging to investigate further . At a guess Iā€™d say the editing via Winscp introduced some bad characters (probably line endings, <CR><LF> , instead of just <LF> ).