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

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

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

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


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," > /etc/dnsmasq.conf
echo "dhcp-option=tag:smartdnsproxy,option:dns-server" > /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:

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> ).