Nota: Este artículo fue publicado originalmente en 2016. Algunos pasos, comandos o versiones de software pueden haber cambiado. Consulta la documentación actual de Unifi para la información más reciente.
How to: Configure Dynamic DNS Service on the Unifi Seguridad 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": , "login": "login_name", "password": "password goes here" } } } } }, }, }, }
We have also published some related articles like(</infrastructure/dns-providers/configure-dynamic-dns-client-ddclient-namecheap/>) and (</ubiquiti/unifi/unifi-customize-usg-configuration-config-gateway-json/>) which may help you if you are new to the Configuración 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 ((</ubiquiti/unifi/clone-mac-address-wan-interface-ubiquiti-unifi-security-gateway/>)), gives you an idea of how more flexible the USG can be when using the CLI or config file.