Can't get client hostnames

Please follow the below template, it will help us to help you!

Expected Behaviour:

I can’t get the client hostnames to show in Pi-hole

Actual Behaviour:

Only IP Addresses showing

Ok, so here’s the setup:
VLAN’s -> Pi-hole -> OpenDNS (In that order)

  • My router is a Ubiquiti UniFi Security Gateway
  • mDNS and some other DNS-related features enabled
  • Cannot for the life of me get the hostnames to show up in Pi-hole
  • Doing a dig -x command to the router returns the hostname just fine

Any suggestions as to how to get the hostnames to show up in Pi-hole? It has something to do with the .arpa requests, when they really are supposed to be PTR…

Fixed! Just Changed the order to Pi-hole -> USG Router -> OpenDNS

How do you mean exactly ?

I pointed Pi-hole to the router (USG), then the router points to my selected DNS servers. And then I tinkered with the forwarding of Non-FQDN settings and then the other one to forward reverse lookups. 85% of my clients’ hostnames now show up in the dashboard :blush:

You mean , in pihole you used
Conditional Forwarding, then router ip
You have a screenshot or so ???

@VenimK Here’s what I’ve got:
image

And then in the UniFi Controller, set the upstream DNS servers for the WAN so that the LAN and all subsequent VLANs use OpenDNS through Pi-hole.

@jaykepeters I am having exactly the same issue as you and have tried EVERYTHING!

I am not sure if I am following right but what i have is:

USG -> Networks -> WAN -> DNS Servers 1.1.1.1, 9.9.9.9
USG -> Networks -> LAN -> DHCP Name Server: 192.168.x.3 [my pihole]
Pihole -> Settings -> DNS -> Upstream Server: 192.168.x.1#53 [my USG]
Pihole -> Settings -> DNS -> Never forward non-FQDNs ON
Pihole -> Settings -> DNS -> Conditional forwarding 192.168.x.1 / localdomain [my USG]

Is this the same setup as you?

Somewhat, but you may be very close. Here is how I set it up:
USG -> Networks -> WAN -> DNS Servers (DNS Servers)
USG -> Networks -> (Network Name) -> DHCP Name Server: 192.168.2.220 (Pi-hole)
image
image
Pihole -> Settings -> DNS -> Conditional forwarding (USG IP)

I had to REBOOT THE USG for the changes to take effect. That usually fixes things in some cases. I also went in the USG’s GUI and set the dns servers as well. Please email me: jayke at jayke dot net and I will get back to you if it is still not working :slight_smile: I don’t usually check here often…

thanks @jaykepeters its essentially the same as I have it. I am guessing this is something to do with the fact I am running pihole on docker on a synology box.

The only thing I am not sure of with your settings is what you have as the DNS servers in pihole. Do you only have your custom upstream server and conditional forwarding on, or do you have have any of the DNS boxes ticked. I have tried with both mind and still no luck. Without them ticked I am still managing to get online becuase I guess its directing the traffic directly to my router and out that way (although imagine it would be quicker to go directly to the DNS via pihole)

Here’s what I’ve got:

DNS Servers are set in the UniFi Controller. I had to reboot my USG for those changes to take effect. Deployment #2 was yesterday :wink:

But still don’t have Pi-hole on our network yet…

Still no luck but I am trying enabling DNSMASQ as think this may help… working progress! https://help.ubnt.com/hc/en-us/articles/115002673188-EdgeRouter-Using-dnsmasq-for-DHCP-Server

So it looks like:

Enable DNSMASQ
Disable ‘Never forward FQDNs’
Restart DNS Resolver in pihole
Flush Logs in Pihole

This is now picking up domains with the USG!

Hope it helps someone and thanks @jaykepeters for your patience!

1 Like

@coalfield You’re most definitely welcome. If you ever need help with Pi-hole in a UniFi environment again, don’t hesitate to reach out!

Best regards,

Jayke
Sartell, MN