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


#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
6041 posts

Uber Geek

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


  #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





News and reviews »

OPPO Releases Its Most Stylish and Compact Smartwatch Yet, the Watch X2 Mini.
Posted 7-Aug-2025 12:37


Epson Launches New High-End EH-LS9000B Home Theatre Laser Projector
Posted 7-Aug-2025 12:34


Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42









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.