Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@mtoddjenkins wrote:

New Unifi user here and just migrated my home network over last night. I get home today and realize DNS is not working correctly on any device I statically address outside of the DHCP server. I've only tested on one device so far, but I might have found a solution.

 

Running Unifi Controller 5.9.29

Under "Clients"

Select on the device in question

In the Properties -> Configuration -> Network

Select the box "Use Fixed Ip Address"

Select the correct network and IP address.

 

I then moved the device back to DHCP on and rebooted it.

It still has the IP address I wanted and pings by hostname are resolving correctly now.


 

This isn't likely to be a permanent fix for you.  If you change either the IP or the Hostname it'll immediately break.  It also may not last through a DHCP lease renewal.

 

You're exploiting the fact that fixed IP address assignment will also be used by DHCP and since the host already has the IP assigned, the lease won't change it.  That's a bad assumption.  I always use fixed IPs that are outside of my DHCP range, otherwise, you run the risk of them being duplicated on the network.

Emerging Member
Posts: 70
Registered: ‎03-18-2018
Kudos: 6
Solutions: 1

Re: UniFi USG local DNS not resolving local hostname correctly

So um, for local resolving we need a separate DNS server?  

LAME.

Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@HenryTheTech wrote:

So um, for local resolving we need a separate DNS server?  

LAME.


You don't NEED one.  But if you care what your devices are named and would like to actually have those names resolve properly, then...yea.

 

-Rob

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

Re: UniFi USG local DNS not resolving local hostname correctly

Only if you're static addressing your devices or if you need an alias to the primary hostname.
DHCP will take the device hostname and put it in DNS like any others.
Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly

Which lots of devices need as they have malformed or "incorrect" host names (spaces, mixed case, etc.)
New Member
Posts: 9
Registered: ‎04-07-2017
Kudos: 6

Re: UniFi USG local DNS not resolving local hostname correctly

So I guess this still has not been fixed? 

 

Same story here and it's getting real old to have to connect to my NAS and servers by IP address since this bloody USG cannot do internal DNS like my good old pfSense did. 

 

Mad2

New Member
Posts: 6
Registered: ‎01-21-2018
Kudos: 5

Re: UniFi USG local DNS not resolving local hostname correctly

[ Edited ]

Yea, I'm sorta blown away this still hasn't been addressed. I get that Ubiquiti has sorta gone to a very user friendly P&P model, but leaving zero control over DNS seems absurd. I could fix this myself in a few minutes with access to their source. I understand that this isn't a huge priority for them as a majority of Ubiquiti deployments aren't going to have this requirement, but at the same time, myself, and presumably others, are now actively avoiding their products on any of my larger installations, knowing they won't addresss simple issues like this. It's a pity, as I really do love their hardware, and they've done (almost) such a good job on the UX.

Regular Member
Posts: 447
Registered: ‎09-27-2017
Kudos: 255
Solutions: 19

Re: UniFi USG local DNS not resolving local hostname correctly


@UBNT-cmb wrote:

@donriggswrote:

 

I apologise if this is a dumb question, but is this UI change still on the roadmap? I am running on 5.7.20 since the recent Cloud Key update and could not find these in the UI.


That didn't make the cut at the time, it is still on the road map. 


@UBNT-cmb How many cuts it still will NOT make? I mean, 5.7.x, nothing. 8, 9, 10 - nothing. Need some help with finding the road map?

 

Sleep

Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@littlewolf wrote:

@UBNT-cmb wrote:

@donriggswrote:

 

I apologise if this is a dumb question, but is this UI change still on the roadmap? I am running on 5.7.20 since the recent Cloud Key update and could not find these in the UI.


That didn't make the cut at the time, it is still on the road map. 


@UBNT-cmb How many cuts it still will NOT make? I mean, 5.7.x, nothing. 8, 9, 10 - nothing. Need some help with finding the road map?

 

Sleep


It's obvious this isn't on the roadmap.

Ubiquiti doesn't even believe the implementation has anything wrong with it; they've said as much.

 

It won't be fixed.

 

 

New Member
Posts: 29
Registered: ‎04-21-2016
Kudos: 4

Re: UniFi USG local DNS not resolving local hostname correctly

@UBNT-cmb 

 

Buy a USG, have to use Synology to handle internal DNS through a GUI- Priceless

New Member
Posts: 3
Registered: 4 weeks ago
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

Hey guys, just wanted to share a workaround I created for this. It's a separate DNS server but it populates automatically from the aliases you set in the controller:

https://hub.docker.com/r/wicol/unifi-dns

source: https://github.com/wicol/unifi-dns

 

Let me know if it works for you and feel free to open an issue on github.

 

I've also thought about the possibility of running something similar on the USG itself, but I'd need to learn more about the provisioning flow and persisting stuff on there..

 

Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@wicol wrote:

Hey guys, just wanted to share a workaround I created for this. It's a separate DNS server but it populates automatically from the aliases you set in the controller:

https://hub.docker.com/r/wicol/unifi-dns

source: https://github.com/wicol/unifi-dns

 

Let me know if it works for you and feel free to open an issue on github.

 

I've also thought about the possibility of running something similar on the USG itself, but I'd need to learn more about the provisioning flow and persisting stuff on there..

 


 

Maybe you can sell it to Ubiquiti since they seem to need the support.

 

New Member
Posts: 4
Registered: ‎02-10-2015

Re: UniFi USG local DNS not resolving local hostname correctly

Heh, It's actually really "pathetic" UBQT has refused to implement this. Last month a friend who manages a chain of half a dozen Internet Cafe's in Los Angeles actually told me this was one of the main reasons he switched the company to Netgate products!

I know it can be done via JSON but its not meants for multiple and dynamic environment.
https://robpickering.com/working-around-incomplete-ubiquiti-unifi-security-gateway-dns-service/
Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@bashywash wrote:
Heh, It's actually really "pathetic" UBQT has refused to implement this. Last month a friend who manages a chain of half a dozen Internet Cafe's in Los Angeles actually told me this was one of the main reasons he switched the company to Netgate products!

I know it can be done via JSON but its not meants for multiple and dynamic environment.
https://robpickering.com/working-around-incomplete-ubiquiti-unifi-security-gateway-dns-service/

 

 

Hey!  Thanks for linking my blog!  Man Happy

 

-Rob

New Member
Posts: 4
Registered: ‎02-10-2015

Re: UniFi USG local DNS not resolving local hostname correctly

OMG that is your write up. THANK YOU SO MUCH Man Happy)
Emerging Member
Posts: 51
Registered: ‎11-19-2016
Kudos: 62

Re: UniFi USG local DNS not resolving local hostname correctly


@bashywash wrote:
OMG that is your write up. THANK YOU SO MUCH Man Happy)

My pleasure mate.  I've got others planned and I want to update my original article on micro-segmentation to reflect the current UI and feature sets.  It's all still valid, but it can be improved.

 

-Rob

New Member
Posts: 3
Registered: 4 weeks ago
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly


@bashywash wrote:
Heh, It's actually really "pathetic" UBQT has refused to implement this. Last month a friend who manages a chain of half a dozen Internet Cafe's in Los Angeles actually told me this was one of the main reasons he switched the company to Netgate products!

I know it can be done via JSON but its not meants for multiple and dynamic environment.
https://robpickering.com/working-around-incomplete-ubiquiti-unifi-security-gateway-dns-service/

I can't believe I've missed that post! I'll give it a read when I get the chance. Very cool @robpickering 👍

New Member
Posts: 31
Registered: ‎09-13-2018
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

This is a dissappointing situation.

 

If I'm going to have to edit a file anyway to get local DNS working I might as well just run pi-hole which uses dnsmasq under the hood and edit some dnsmasq config files.

 

I do not like editing these JSON files.  The whole process is clunky.  I had to do this when I was bypassing my AT&T fiber equipment.  I have since switched ISPs and no longer have to do this and never wish to again.

 

Even the existing functionality doens't seem to work for me.  For instance, I had previously configured an IP camera to be 10.10.10.97, then I got rid of it and I made my phone 10.10.10.97 but my /etc/hosts still says:

 

10.10.10.97 ipcam_001122334455_1.localdomain #on-dhcp-event aa:bb:cc:d:ee:ff

 

... no mention of my phone being 10.10.10.97 which it has been for several days now.

New Member
Posts: 18
Registered: ‎08-03-2017
Kudos: 2

Re: UniFi USG local DNS not resolving local hostname correctly

Its been some time for me but I believe we solved this issue by clearing the Domain Name field in the LAN network settings, then used SSH to access the USG and clear the Hosts file. I believe it was a hostname/ dns cache issue on the USG router.
We were using USG as the DNS Server, and eventually switched to using a Windows Server with a domain and Windows Server for DNS.

From UBNT support:

you would need to clear the Domain name from the LAN network.Then delete the host file from the USG through SSH using the below command

 

 

sudo rm /etc/hosts

https://help.ubnt.com/hc/en-us/articles/218850057-Intro-to-Networking-How-to-Establish-a-Connection-...
Bray K: Please refer to this link to SSH into the USG

 

New Member
Posts: 1
Registered: ‎01-07-2017

Re: UniFi USG local DNS not resolving local hostname correctly

I deployed four USG's accross four remote offices (in four counties) because of how easy they were to manage remotely via the Cloud Controller. Unfortuanatly I have to log onto a local PC and run angryIP to work out which hosts are which because all I see are Mac Addresses.

 

The only site where hostname resolution works correctly in DHCP / DNS is the site which is also using a UniFi Switch 24 POE-250W.

 

We get support from broadbandbuyer.co.uk and their response was "You have to use a Unifi Switch'.

 

Ridiculous!