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

Re: UniFi USG local DNS not resolving local hostname correctly


@NAUIDiverwrote:

Wow.  I stumbled onto this thread after spending an entire day with support because it I couldn’t resolve my Synology NAS since it’s a fixed IP and not dhcp client.  Omg it still isn’t working!  

 

None of my local workstations can reach the host by name, but we can using its IP address.  

 

What scares me most is how old this thread is!   Yikes.  Not feeling great about my switch to USG.  

 

Even my tiny little FIOS router handled this without blinking!  And I could enter address and alias names into their UI without even flinching. 

 

Hope this gets fixed soon!


 

Depends on what you mean by "Fixed".  If you want a solution that works, then you should be able to find it earlier in this thread.  Unfortunately, it requires manually editing files on the USG; but it does work.

 

If you want a "user friendly" method of doing this, then you'll have to wait.  I'm going to guess another year or so based on the pace of releases, missed versions, missed features, etc. that we've been promised for the last 2 years.  I'm sure someone will come in and promise that it's "in the upcoming release", but all you have to do is go back in this thread and see those same promises unfulfilled.  

 

 

Emerging Member
Posts: 43
Registered: ‎03-27-2018
Kudos: 16
Solutions: 1

Re: UniFi USG local DNS not resolving local hostname correctly

Yup. I’ve gone in by SSH and made the change. But I was on with support all day because my json file keeps putting the USG into a provisioning loop.  It’s a super simple file and passes json validation testing yet still causes loop.  So support came in remotely and even they can see it should work.  They tried to create one of their own as well and still caused a loop.  So they pulled all my logs and are back at L2 engineering to try and figure it out. In the mean time I’ll keep using the console to manually set dns for my fixed IP servers. 

 

And by fixed, I mean truly fixed.  Not dhcp reserved.  Set at the adapters of the hosts.  

 

I can can see how old this and several other threads on very similar topics are.  Amazing yet also very frustrating.  I should have found this before I bought the USG!  Argh. 

 

Will be be monitoring these threads.  Hopefully it won’t be another two years before it’s a fully function router.  

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

Re: UniFi USG local DNS not resolving local hostname correctly

If I only read this thread before spending so much money on ubiquiti  equipment :-(

 

So in a nutshell I can only set user friendly hostname by editing the json file? Otherwise the DNS name will be the one defined on the client end?

 

Can you please give us approximate date for this DNS Forwarder feature?

New Member
Posts: 13
Registered: ‎01-08-2018
Kudos: 33

Re: UniFi USG local DNS not resolving local hostname correctly

We could buy @UBNT-cmb a beer Icon Wink

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

Re: UniFi USG local DNS not resolving local hostname correctly

FWIW, I just posted a HowTo on getting your security gateway to act as a real (mostly) nameserver.  The setup I posted ignores the junk in the /etc/hosts file from the dhcpd server and uses whatever hosts files you provide, and will do mutiple domains, etc.  It's here in this forum:

 

Advanced-DNS-Setup-on-a-Unifi-Security-Gateway-HowTo

 

I'm using it now and I'm quite happy with its performance.

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

Re: UniFi USG local DNS not resolving local hostname correctly


@Alen79 wrote:

If I only read this thread before spending so much money on ubiquiti  equipment :-(

 

So in a nutshell I can only set user friendly hostname by editing the json file? Otherwise the DNS name will be the one defined on the client end?

 

Can you please give us approximate date for this DNS Forwarder feature?


 

It'll be easier to just assume it's never happening.  That way you'll be pleasantly surprised if/when it does.  Asking for *when* is pointless as even if you get an answer, it won't happen in that time frame.

 

-Rob

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

Re: UniFi USG local DNS not resolving local hostname correctly


@gdledford1069 wrote:

FWIW, I just posted a HowTo on getting your security gateway to act as a real (mostly) nameserver.  The setup I posted ignores the junk in the /etc/hosts file from the dhcpd server and uses whatever hosts files you provide, and will do mutiple domains, etc.  It's here in this forum:

 

Advanced-DNS-Setup-on-a-Unifi-Security-Gateway-HowTo

 

I'm using it now and I'm quite happy with its performance.


 

This is a great tutorial, but it shouldn't be necessary on a device of this caliber.  It's also far beyond a number of folks in the forum, and probably more work than those of us who could do it, want to spend.

 

-Rob

New Member
Posts: 7
Registered: ‎03-20-2018

Re: UniFi USG local DNS not resolving local hostname correctly

[ Edited ]

@NAUIDiver wrote:

Wow.  I stumbled onto this thread after spending an entire day with support because it I couldn’t resolve my Synology NAS since it’s a fixed IP and not dhcp client.  Omg it still isn’t working!  

 

None of my local workstations can reach the host by name, but we can using its IP address.  

 

What scares me most is how old this thread is!   Yikes.  Not feeling great about my switch to USG.  

 

Even my tiny little FIOS router handled this without blinking!  And I could enter address and alias names into their UI without even flinching. 

 

Hope this gets fixed soon!


There is also an issue with DSM and its hostname.

I've had the same issue with not being able to connect to my DS918+ by hostname in Windows, but can browse to it by IP.

However, out Xerox MFPs can send files by SMB using its hostname.

I searched on the Synology forums and other users are reporting hostname issues on the current version of DSM, 6.1.

 

As for how it relates to Unifi, I have my USG set as DNS server and I can do a nslookup but not connect by hostname in Windows.

New Member
Posts: 6
Registered: ‎04-04-2017
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

Any update on this?

Is it still on the roadmap and when can we expect to see it?

 

I really need a way to edit the hostnames used by the internal DNS. 

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

Re: UniFi USG local DNS not resolving local hostname correctly

No. There is a way to edit local hostnames, it just sucks. It takes about 2 years for Ubiquiti to put features into the GA code train, so if you don't want to wait, you can run the Betas.
New Member
Posts: 14
Registered: ‎01-09-2018
Kudos: 1

Re: UniFi USG local DNS not resolving local hostname correctly

Is it feature finally available in the beta ? Which version?

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

Re: UniFi USG local DNS not resolving local hostname correctly

Hi guys,

 

Any update on this?

 

Will the new option "Use dnsmasq as DHCP server" available in version 5.8.24 solve this issue?


thanks

Alen

Highlighted
New Member
Posts: 2
Registered: ‎06-26-2017

Re: UniFi USG local DNS not resolving local hostname correctly

Hi,

 

> Will the new option "Use dnsmasq as DHCP server" available in version 5.8.24 solve this issue?

 

nope. Even with the new dnsmasq as dhcp options the aliases are still only display names and for name resolution you have to go the static mapping route in the config.gateway.json file. 

New Member
Posts: 6
Registered: ‎08-03-2018

Re: UniFi USG local DNS not resolving local hostname correctly

One more chiming in for this. It's a problem and it's what's keeping me from going all in with the USG.

 

I used an edgerouter about two years ago that I dumped for pfsense because of this exact issue. You can kind of work around it on the ER, but it's a kludge, and it's kind of ridiculous that you have to. Pfsense does this perfect. So does Asus. DD-WRT. Tomato. Gargoyle. The list goes on.

 

I appreciate the efforts at keeping these products updated and supported without maintenance fees, and love it for that, but this stuff seems basic.

New Member
Posts: 6
Registered: ‎08-03-2018

Re: UniFi USG local DNS not resolving local hostname correctly

For now, I've given up on it. I hope this will work in a future release.

 

Until then, I've turned off both DHCP and DNS on my USG and given those duties over to pihole running in a VM, which handles local resolution (with dnsmasq under the hood, no less) in a way that makes sense.

 

It's not ideal as I'd like this to behave appropriately so I could manage it all in one device, but it works. However, I'm sure running dhcp and dns elsewhere isn't viable for everyone.

 

I'll keep an eye out for enhancements in future releases.

Regular Member
Posts: 561
Registered: ‎12-15-2016
Kudos: 58
Solutions: 14

Re: UniFi USG local DNS not resolving local hostname correctly

Ok, so I have to be the idot one for a moment and ask:

 

What is this problem that this thread is about.....Im not a network expert so dont understand what the thread title actually means or if I have the same issue in my home set up and just dont know it? (my home set up is now entirely Unifi gear, except the modem....I have: Modem - USG 3P - US8-60W - UAP AC Pro).

 

Sorry to be daft, but if you dont ask, you dont learn.

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

Re: UniFi USG local DNS not resolving local hostname correctly

So lets say you have a windows machine named windows1, it runs as your file server, and web server.

 

The only way you can connect to that machine is via the windows1 name, you cant create an additional name such as fileserver1 or webserver1 without making a manual edit to a USG internal file. This is a very basic function for almost any DNS/DHCP equipment. Hence why some folks are so frustrated this isn’t available.

 

While many home users don’t need this feature, homelab and more advanced users often need it.

 

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

Re: UniFi USG local DNS not resolving local hostname correctly


@donriggs wrote:

We could buy @UBNT-cmb a beer Icon Wink


I'll buy him a case.  I'll even ship him hard liquor of his choice.  This is the only thing preventing me from having a pure Ubiquiti network, but it is preventing it.

New Member
Posts: 6
Registered: ‎08-03-2018

Re: UniFi USG local DNS not resolving local hostname correctly

Im using a USG, but I'm leaving the DNS/DHCP to pihole, which works way better. There's benefits to doing that, as the pihole sinkholes DNS for ads, as well, which I wouldn't expect the USG to do even if it's DNS worked the way we all expect it to.

 

 

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

Re: UniFi USG local DNS not resolving local hostname correctly

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

 

I originally posted on this thread December 10, 2016.  I misunderstood what the OP was asking for, so technically I hijacked the thread.  My original issue was that I needed a way to specify the DNS hostname that was being used by the USG.  I was seeing all kinds of weird behavior.  

 

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

"Hosts with DHCP reservations have their client-provided client-hostname registered in DNS, same as dynamically assigned clients.

 

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

 

There was a lot of back-and-forth about misunderstandings, how the USG actually works, and defending that the USG was operating as designed that followed, including various methods of working around the issue.  One area that seemed to spark some defensiveness was that customers were suggesting that the implementation was "broken".  I finally clarified exactly my issue in the following post in August, 2017 (yes a year later):

 

"What is needed are two additional capabilities and at this point I do not see these happening on the USG, which is why I've abandoned it for DHCP, DNS, and therefore Firewalling (in favor of a pfSense server, which supports all of these):

  • Ability to change the client-identified Hostname that is used for resolution (doesn't have to be the alias, sounds like it shouldn't based on historical usage of that field, but allow for the editing of the Hostname field and subsequent disabling of future dynamic client updates of the hostname for that IP/MAC)
  • Ability to add static DNS entries for hosts that are manually assigned an IP address

These two features would make the USG DNS usable on networks that contain:

  • Mis-identifying hosts providing inaccurate or impromper names for DNS resolution
  • Statically assigned (not reserved) host resolution for hosts that do not participate in DHCP

The DNS resolution on the USG is tightly coupled with DHCP, which is what causes the issues mentioned above. This is actually the only DNS implementation I've run across that is so tightly coupled, I'm sure it has to do with the implementation; but I need a fully operational DNS server for my internal network and the USG isn't it."

 

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

 

And so, as we rapidly approach the 2 year mark on the original ask, Ubiquiti has again promised this feature set (5 months ago), but it hasn't shown up.

 

Most folks that have the problem have solved it in one of three ways:

  1. Manually editing the config.gateway.json file any time you want to update anything
  2. Moved DNS (and probably DHCP) off to another device (Synology NAS, pfSense, piHole, basically anything else works)
  3. Just live with it (probably not an option for anyone with a moderate network)

At this time, we haven't seen any real progress on this issue in 2 years (other than the "default hostname" being added back into the GA code train (where it was in October, 2016, but was then removed and a year+ later re-added")).  

 

Your options are listed above.

 

-Rob

Reply