Emerging Member
Posts: 52
Registered: ‎07-17-2018
Kudos: 5
Solutions: 2

Re: UniFi USG local DNS not resolving local hostname correctly

I was following this thread while I switched all my clients over to a fixed IP through the controller which I am assuming is basically a reserved DHCP IP.  I waitedd a couple of days for all my clients DHCP reservations to expire and acquire new IPs as per what I configured.  I tested today and I can ping all my clients via their hostname.  I had also switched to dnsmasq prior to the above changes.  SO I am happy this all worked out on all stable firmwares/software. 

New Member
Posts: 14
Registered: ‎01-09-2018
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

yes - but where/how did you define the hostnames for your clients
Established Member
Posts: 1,643
Registered: ‎11-12-2015
Kudos: 456
Solutions: 47

Re: UniFi USG local DNS not resolving local hostname correctly


@robpickering wrote:

...
So, for those finding this thread in modern times, I wanted to summarize where we are in one post.

...

@UBNT-cmb then posted a response, explaining the behavior:

...

Defining an alias and not an IP is a fundamentally difficult thing to get to register in DNS by the nature of how that all works. Not likely to see that for a while if ever."


Why is it that when you define and Alias for a *device* (and the device has a DHCP reservation) it becomes a DNS name, but when you define an Alias for a *client* it does not?

 

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

I totally agree that this should be fixed and maybe I missed something in the thread earlier, but whats the problem with just cleaning up the /etc/hosts file on the USG itself? I was having a problem with a freeNAS box, that grabbed an IP address via DHCP during intial install, then I made it static - everything on the network resolved to the original DHCP address rather than the static until I edited /etc/hosts file on the USG to clear the DHCP entry and added my own for the freeNAS server. 

 

So until the UBNT folks get it resolved can't we just manage the /etc/hosts file for those addresses outside of DHCP - seems simpler than json file messing and a pretty simple workaround. Sure this would be insane for a large network but SOHO and home LAN's should be manageable. 

New Member
Posts: 14
Registered: ‎01-09-2018
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

[ Edited ]

 

 

 

@UBNT-cmb then responded on March 21, 2018 with the following (emphasis mine):

"It works as it's designed to work, in a way that suffices for many. Static records can be added via host-record config.gateway.json, but that requirement will be gone soon. We're adding full DNS Forwarder control in controller in the future, for adding domain overrides, static A, AAAA, CNAME, PTR records, etc. And probably a new field on clients to set a hostname, so Alias is just an alias (for display purposes only) and DNS is configured from the hostname field."

 


 

 

Are there any news regarding the DNS Forwarder option?? This is still not available as I can see....?


@UBNT-cmb: You seem to be ignoring this thread for a while. Could you please kindly give us an update on this?


Thanks

Ale

 

New Member
Posts: 4
Registered: ‎12-21-2017
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

Is this feature out in any of the 5.8 betas? I'm using the 5.6 LTS's currently.
New Member
Posts: 14
Registered: ‎01-09-2018
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

nope, I'm on 5.8.28 - and can't find such a feature...

I really hope anyone of the Ubiquiti guys will finally give us an update again on this!

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

So I guess I get why its not working with a USG not running a full DNS server and for me in my very small home network that is all Unifi USG, Unifi Switch and AP's - editing the hosts file sees to work fine and resolves most of the issues I was experiencing. Seems odd but OK, I can deal with this "work around" of editing the hosts file on the USG and being able to resolve my very few staticly assigned devices at home.  

 

What I dont get is why the Unifi contorller also does not use the DNS setting provided when another server is providing the DNS and DHCP services? In my production environments at work we use Cisco ASA's for the firewalls that are outsourced, and a W2012r2 server for the Domain that provides Domain authentication, DHCP, and DNS for the LAN. When I add a Unifi Cloud Key to the mix to keep track of my Unifi Gear (Switches and AP's) why doesn't the Cloud Key query the DNS server given to it at set up  (in the Configure section of the Cloud Key not the Manage)? Instead of resolving IP Addresses to DNS names, it just give me a bunch of MAC addresses with a rare sprinkling of some names that actually get resolved. Did I configure something incorrectly? I would expect the CloudKey to resolve those addresses with the Windows DNS server. 

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

Well the /etc/hosts on the USG did not work for long for me, and turns out to be a real pain to keep clean - especially if you have multiple subnets and VLANs.

 

I Currently have a USG, a Unifi CloudKey, Unifi Switches and Unifi AP's and my DNS/DHCP is controlled by a small Debian server running dnsmasq (really does not make sense to me the USG doesnt provide this natively). The LAN resolves everything fine as all devices are using the Debian server as their DNS server - all except for the USG and the Unifi Cloud key - for them I just get a bunch of mac addresses where hostnames should be. Oddly some of them are resolving - not sure how, would like for it to be more consistent.  

New Member
Posts: 25
Registered: ‎03-11-2017
Kudos: 27
Solutions: 1

Re: UniFi USG local DNS not resolving local hostname correctly


@ChemGro wrote:

Well the /etc/hosts on the USG did not work for long for me, and turns out to be a real pain to keep clean - especially if you have multiple subnets and VLANs.

 

I Currently have a USG, a Unifi CloudKey, Unifi Switches and Unifi AP's and my DNS/DHCP is controlled by a small Debian server running dnsmasq (really does not make sense to me the USG doesnt provide this natively). The LAN resolves everything fine as all devices are using the Debian server as their DNS server - all except for the USG and the Unifi Cloud key - for them I just get a bunch of mac addresses where hostnames should be. Oddly some of them are resolving - not sure how, would like for it to be more consistent.  


You have to disable the updates from DHCP into DNS for the hosts files to remain as you put them.  In my case, it was a little easier because my config completely ignored the /etc/hosts file and instead manually loaded /etc/hosts.domain files instead.  But, to be fair, it was a pain to upkeep for other reasons, and I now use a Fedora 28 server running bind to manage my DNS resolution (although I let the USG keep doing dhcp).

 

 

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

I moved the DHCP [and sortof DNS] off the USG (except for VLANs) - tryng to get this resolved - I moved them to a standalone debian server running dnsmasq - all addreses resolve correctly from clients within the LAN except the Unifi gear. I currenty have an open ticket with Unifi [I think] - still not getting anywhere. The Unifi support folks have also told me that the CloudKey does not use a DNS service to resolve the host names it displays, it somehow relies on the router to provide that. I have the CK set to use my in house DNS server, no idea how the USG can be set to use the internal DNS server if that is whats breaking it. 

 

Just want the Cloud Key(s) to display hostsnames instead of MAC addresess - seems like it should simply be able to do that. 

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

Pretty much giving up on this for now (still have a ticket open with Unifi support I think, they have not responded). What seems to be happening in my setups (and its every install of Unifi Gear 7 locations - only one is using a USG [home LAN] the rest are using Cisco ASA's [Production]).

 

If I run DHCP for the LAN on the USG - then on the Unifi CK controller, it seems to know about clients that have been assigned by USG's DHCP but no Static IP hosts are known. This seems to hold true even if I let the USG perform its "sortof" DNS, or run an internal DNS server and point the USG DHCP server to the internal - it doesnt seem to care about static hosts. 

 

If I run DHCP and DNS for the LAN using dnsmasq on a debian server inside the LAN, everything resolves fine for everything in the LAN except the Unifi devices (from Gui that is - at CLI for some devices things resolves fine - will test each device when i get a chance but a switch worked fine resolving internal addresses). Even if they (USG and CK) are pointed to the internal DNS server, it is stil hit or miss if the Controller will display correct information about the clients in the lan on its GUI web Page. 

 

And since I am after consistent statically assigned hosts in the LAN - I will use an internal DNS/DHCP that works consistently and just expect the Controller to display wonkey information about Clients in the LAN from time to time. I have even seen it ghost clietns - a Wireless cellphone client leaves the LAN and the Controller will suddent display this same client as if it is connected to another LAN wired all the sudden. Very strange, maybe in the furture they will get the process of displaying correct client information down - particularly static ones - dont know about anyone else, but for my LAN's the static ones are the ones I truely care about and need to work, DHCP assigned clients will come and go without me needing to know them.  

New Member
Posts: 5
Registered: ‎05-17-2018

Re: UniFi USG local DNS not resolving local hostname correctly

I have just bought a USG 3P to replace my home built pfsense firewall. I wanted to have everyting administered in the same place, but the USG's lack of internal DNS resolution for the devices and clients with static DHCP addresses is somewhat of a dissapointment. A shame as I really like everything else about the Unifi setup.

 

Ubiquiti, please add support for internal DNS.

 

-JASE 

Emerging Member
Posts: 47
Registered: ‎11-19-2016
Kudos: 55

Re: UniFi USG local DNS not resolving local hostname correctly


@jseedorff wrote:

I have just bought a USG 3P to replace my home built pfsense firewall. I wanted to have everyting administered in the same place, but the USG's lack of internal DNS resolution for the devices and clients with static DHCP addresses is somewhat of a dissapointment. A shame as I really like everything else about the Unifi setup.

 

Ubiquiti, please add support for internal DNS.

 

-JASE 


We all like the convenience of having it all managed in one place.  But do all of us a favor and return the USG.  The only way we'll get Ubiquiti to address this 3+ year-old problem is to vote with our wallets.  If sales drop off, maybe they'll address the issue.

New Member
Posts: 5
Registered: ‎05-17-2018

Re: UniFi USG local DNS not resolving local hostname correctly


@robpickerin wrote:

But do all of us a favor and return the USG.  The only way we'll get Ubiquiti to address this 3+ year-old problem is to vote with our wallets.  If sales drop off, maybe they'll address the issue.


I agree, but I am unfortunatly past the point of returning my USG 3P. However, I can tell Ubiquiti that I will not be able to push their USG to my SMB customer if it does not provide internal DNS resolution (for devices and clients with DHCP static IP. Instead I will have to use a PC Engines box with pfsense. This will make both me and my customers less happy, as everything cannot be maintaind through the Unifi setup.

 

Apart from the missing internal DNS, Ubitique has made a really nice solution. 

New Member
Posts: 24
Registered: ‎03-29-2017
Kudos: 12

Re: UniFi USG local DNS not resolving local hostname correctly

Have to say I agree - it is ridiculous that this is going on for as long as it is. You would be much better off (allbeit not fully Unifid) with a different Gateway router. 

 

I have tested this pointing everything to the internal DNS and the USG refuses to use it. Have had a ticket opened with their support and they just asking me for a  show tech-support | no-more file that I have sent in once and will trudge through again to send in a second one. My most irritating point is the Display of clients on the CloudKey itself - the CK can resolve the static address from command line (as do the switches and AP's) but it still only displays MAC addresses. 

 

Just dont get it. 

New Member
Posts: 1
Registered: ‎01-17-2018
Kudos: 3

Re: UniFi USG local DNS not resolving local hostname correctly


@UBNT-cmb wrote:

It works as it's designed to work, in a way that suffices for many. Static records can be added via host-record config.gateway.json, but that requirement will be gone soon. We're adding full DNS Forwarder control in controller in the future, for adding domain overrides, static A, AAAA, CNAME, PTR records, etc. And probably a new field on clients to set a hostname, so Alias is just an alias (for display purposes only) and DNS is configured from the hostname field. 


Adding another vote for how nice it would be to have this promised feature.

New Member
Posts: 8
Registered: ‎03-25-2018
Kudos: 3

Re: UniFi USG local DNS not resolving local hostname correctly

Cant even offer basic features that FREE routers/firewalls offer.

 

Junk.

Emerging Member
Posts: 75
Registered: ‎04-21-2017
Kudos: 27
Solutions: 1

Re: UniFi USG local DNS not resolving local hostname correctly

This is getting really embrassing. 

New Member
Posts: 2
Registered: ‎10-18-2018

Re: UniFi USG local DNS not resolving local hostname correctly

I am having an issue which I believe is related to this topic, I will describe it here and would appreciate if anyone could confirm. 

 

I have a network composed entirely by ubiquiti equipments (gateway, switches, wireless access points). All devices (laptops, smartphones, tvs) connect to the network by cable, wireless or both. The problem is: When a laptop connects to the network with the name of laptop1, acquires the IP 10.100.0.50, and I change the laptop's name to laptop2, I can ping the laptop by its new name (laptop2) and it will show me the IP address 10.100.0.50. But if I ping -a 10.100.0.50, it still shows me the previous name (laptop1). So the IP address is attached to 2 different names (laptop1 and laptop2). On my previous experience using Windows server 2012 this would not happen, if it did, it would be fixed automatically in a short period of time (less than a day), but with unifi this doesn't happen, taking much longer, sometimes a week or longer (or maybe in some cases doesn't change).

 

All clients use DHCP. I cleared the dns cache via ssh, and also flushed dns on the workstation but still nothing changed. One thing that is intriguing is that on the unifi controller, it shows the correct IP address for the correct workstation name.

 

Is that the same issue?