Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/CloudIngenium.com/htdocs/wp-includes/functions.php on line 6114
How to: Configure Dynamic DNS Service on the Unifi Security Gateway via config.gateway.json – Knowledge eXchange

How to: Configure Dynamic DNS Service on the Unifi Security Gateway via config.gateway.json

How to: Configure Dynamic DNS Service on the Unifi Security Gateway via config.gateway.json

Thankfully the latest versions of Ubiquiti’s Unifi Controller allow the user to configure dynamic DNS services via the Web UI. However, there are cases when you rather keep the configuration on the config.gateway.json file. In my case the main motivation to use the config.gateway.json method is because you can set up the Dynamic DNS service for each Ethernet port, and when you are using two WAN ports you probably need one for each of your public IPs. Whatever the reason, you can configure your Dynamic DNS service settings via the configuration json file, and we will teach you how:

The General Config file layout

Here we show you the layout/template of the configuration file to manage the Dynamic DNS service. Remember this is a json file so make sure to validate it before you commit it and abide to the schema when adding the relevant sections to avoid breaking something else.

{
        "service": {
                "dns": {
                        "dynamic": {
                                "interface": {
                                        "eth0": {
                                                "service": {
                                                        "dyndns": {
                                                                "host-name": [
                                                                        "mgmt.domain.com"
                                                                ],
                                                                "login": "login_name",
                                                                "password": "password goes here"
                                                        }
                                                }
                                        }
                                }
                        },
                    },    
        },
}

We have also published some related articles like How to: Configure a Dynamic DNS Client (DDClient) with NameCheap? and UniFi – How to further customize USG configuration with config.gateway.json which may help you if you are new to the Configuration file or need help/suggestions on what Dynamic DNS service to use. I personally have tried a few and currently my preferred choice is NameCheap. I strongly recommend them, particularly because you can use your custom domain with dynamic DNS, vs having to use third party domains that don’t have as strong business presence as using your own domain. We also have another article covering how to clone a Mac Address on the USG (How to: Clone the mac address for the WAN interface on a Ubiquiti Unifi Security Gateway), gives you an idea of how more flexible the USG can be when using the CLI or config file.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.