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