Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


wratterus

1687 posts

Uber Geek
+1 received by user: 678


#281510 22-Feb-2021 11:48
Send private message

Have a site running a USG, we have a config.gateway.json file for a static DNS entry, this works great. 

 

I need to add multiple static DNS entries for the same local IP (say device1.domainname.co.nz and device2.domainaname.co.nz to point to the same internal IP).

I can do this, but it doesn't behave as expected - the entries work, but don't show when the USG config is exported, and the entries can't be deleted. I suspect it's doesn't like having multiple host names set for the same IP using the set system static-host-mapping command, but can't seem to figure out how to do this correctly. 

 

Have posted on Ubiquiti's forums about it, but it's pretty hard getting any help there these days, so thought I'd try here to see if anyone had done this before. 

 

Thanks!


Create new topic
davidcole
6112 posts

Uber Geek
+1 received by user: 1476

Trusted

  #2661083 22-Feb-2021 12:34
Send private message

That was one way to do it.....but I think the way forward is that you add a new client in the controller software, and you can set a statis IP that way.  I used to have a bunch of stuff set up like that.

 

Click to see full size

 

Only works if the device has the same domain as your network.

 

Another way to do it, is to add entries in a <filename>.conf file in /etc/dnsmasq.d on the USG.

 

# shared named back to other machines
address=/openhab.domain.com/192.168.10.27
address=/unifi.domain.com/192.168.10.45
address=/influxdb.domain.com/192.168.10.45

 

 

 

I have this in a home.conf file.....but then you need to make sure when you firmware update the device to copy that file back.  A bit of a pain.

 

 





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 




wratterus

1687 posts

Uber Geek
+1 received by user: 678


  #2661215 22-Feb-2021 17:42
Send private message

Did manage to figure this out - I just needed to make any subsequent entries aliases. Probably dead simple, just not something I've had to do before. 

 

The initial command to create the static DNS entry looks like 

 

set system static-host-mapping host-name device.domainname inet <ip address>

 

And any subsequent entries for the same IP need to be aliases, like...

 

set system static-host-mapping host-name device.domainname alias 1.device.domainname

 

And editing the config.gateway.json file to reflect that is pretty easy. 

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.