Conditional forwarding and RouterOS

Hi I have been googling like crazy to help find a solution with conditional forwarding and Router OS. I am new to mikrotik but have been using pihole for a while now.

The issue is i cannot get hostnames instead of ip addresses using this device (mikrotik hex). I am running pihole docker in unraid and blocking works perfectly. Is there any configuration i need to do. In mikrotik i have a dhcp lease script which populates ipaddress with their hostnames.

Thanks for any help

What's the output of the following command?

nslookup <hostname> <mikrotik-ip>

where you substitute <hostname> with a known hostname within your network and <mikrotik-ip> with your router's IPv4 address.

thanks for the reply - is that any hostname on my network? If yes please see below:

DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.0.1

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

This would suggest that your Mikrotik isn't answering DNS queries.

If you happen to know the IPv4 address for the hostname you tried to get resolved with your prior command, you may further confirm this by running the respective reverse lookup:

nslookup <host-ipv4> 192.168.0.1

This would be very similar to what Pi-hole is doing when conditionally forwarding.
It should return the hostname, but given your previous resullts, I fear it'll time out as well.

Mikrotik devices may require installation of a custom script to register DHCP hostnames with its internal DNS, but it would seem you already installed such a script?

In that case, you should probably verify that your router is configured to allow DNS requests from your Pi-hole machine.

I'm unfamiliar with Mikrotiks, so you'd have to consult your router's documentation and support channels for further details.

Appreciate the assistance thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.