DHCP Server use different DNS on specified IPs

Hello guys,

i need your help. I have a DHCP running in my network and set to use the mikrotik router as DNS Server.
On the same network are also 3 Devices that should use a different DNS Server.

Is it possible after reserving an IP Adress to set an different DNS Server only for the specified adress?
As i understand the DNS Setting can only set in the DHCP Server - Networks Setting, in which i set the full /24 network (in which are the 3 hosts)

Or do you have an simplier idea todo this? (I could set it by static but would prefer over dhcp)

Thanks and best regards

Do redirect DNS queries for particular IPs with dst-nat rules

Was my first idea but it is not working because the DNS Server is on the same subnet as the clients.

You need to implement Harpin procedure.
make dst-nat rule to redirect queries to new DNS server and src-nat to make packets look like coming from router.

You can add /32s into the DHCP network settings so that you can override settings for individual IPs

Mmh i exactly understand how hairpin-nat is helping, maybe i dont understand it correct^^

My network:
address-pool=dhcp-local authoritative=after-2sec-delay disabled=no interface=bridge1 lease-time=1d name=dhcp-local
address=192.168.1.0/24 dns-server=192.168.1.2,192.168.1.3 gateway=192.168.1.1 netmask=24

Clients 192.168.1.121-139 should recieve the DNS Server from another network 192.168.2.1 for example.

The problem why the dst-nat rule is not working for the moment is because the dns request doesnt get through the router the DNS Servers 192.168.1.2 and 192.168.1.3 will contacted directly.
Or did you mean something else?

Edit:
@nickshore
I will try thanks
Is this correct?
address=192.168.1.121/32 dns-server=192.168.2.1 gateway=192.168.1.1 netmask=24 ntp-server=192.168.1.1

Edit2:
Thanks it is working :slight_smile:

How were able to implement this? can you lay down the steps for me?