Adding host records and cnames to a Unifi USG


At the moment I have my local domain name set to gsellis.com – the first issue I came across was that I lost the ability to look up my domain names on the internet – because the USG held the record of truth for gsellis.com.

I am fairly sure I should be able to configure it to look up unknown addresses, but i have not found out how yet.

The current solution I have implemented is to update the dnsmasq config with my internet domain name records – this means that if I make a change, I need to make it locally and on the internet – I will fix this when it becomes an issue.

{
"service": {
   "dns": {
     "forwarding": {
        "options": [
           "ptr-record=1.5.168.192.in-addr.arpa,USG",
           "all-servers",
           "cname=unifi.gsellis.com,unifi",
           "server=8.8.8.8",
           "server=8.8.4.4",
           "host-record=unifi,192.168.5.8",
           "host-record=gsellis.com,45.153.187.229",
           "cname=www.gsellis.com,gsellis.com"           
           ]
         }
     }
  }
}

Here I have my upstream DNS for the USG set to google, plus the domain name record for gsellis.com – i have included others but they arent important here.

Initially I just added the host record and cname – this resulted in the USG losing the ability to lookup any websites – meaning things like time server, dynamicdns etc stopped working. Adding the data back fixed things.


Leave a Reply

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