Skip to content

UniFi Network Notes

Klint Van Tassel edited this page Feb 9, 2022 · 25 revisions

FAQs

Do you have questions? Do you feel that they are of the "frequent" variety? If so, then feel free to peruse this list of questions to see if you can find an answer.

Q: Why am I seeing a wireless network starting with element- on my AP?

This network is for UniFi element adoption, and shows up if you don't have a wireless network setup on the untagged/default VLAN. Starting in controller version 5.12.46, you can disable this in classic mode settings, under Site, check Enabled wireless uplink and uncheck Enable element adoption then uncheck Enabled wireless uplink and save. Then delete the element- wireless network. (UI-Glenn)

Q: How do I shutdown my UDM/UDM-Pro?

You can manually shutdown your device using sysreq-trigger. (Diamenz)

echo 1 > /proc/sys/kernel/sysrq 
echo s > /proc/sysrq-trigger
echo o > /proc/sysrq-trigger

Q: My USG won't upgrade to the latest firmware, it says that the image does not support the device when I try to upgrade. How do I fix this?

There is an issue with the 4.4.36 USG firmware that prevents an upgrade to 4.4.44 due to a compatibility check failure. This check can be bypassed by commenting out the exit 1 command on line 504 of /usr/bin/ubnt-upgrade. (UI-JSee)

Q: Why isn't the latest stable Controller version available via apt-get update after it's been announced on the community forum?

One week from the time a release goes stable (on the community forum), it will be pushed to the download site, Debian/Ubuntu/Cloud Key repos, etc. (UBNT-MikeD)

Q: Do I have to perform a stepped version upgrade to get the latest version?

Nope. You can go direct from most previous versions, going back to 3.1.0, to the latest version. Note, however, that if a new patch version of the 5.6 branch is released, a newer patch version of the latest stable branch will also need to be released before you can upgrade. (UBNT-MikeD)

Q: Why can't I adopt a UAP-AC Gen1, UAP-AC Outdoor and/or PicoM2 device into my 5.7.x or newer Controller?

UniFi Controller 5.6.x will be the LTS release for the UAP-AC and UAP-AC-Outdoor models (and PicoM2). (UBNT-APieper)

Q: How do I reset my Controller admin password?

Connect via SSH and update the salted hash that's stored in the database. (UBNT-MikeD)

# this resets the password for 'admin' to 'password'
mongo --port 27117 ace --eval 'db.admin.update( { "name" : "admin" }, { $set : { "x_shadow" : "$6$9Ter1EZ9$lSt6/tkoPguHqsDK0mXmUsZ1WE2qCM4m9AQ.x9/eVNJxws.hAxt2Pe8oA9TFB7LPBgzaHBcAfKFoLpRQlpBiX1" } } )'

Q: Can I use an external MongoDB server?

In 5.3.x (and later) this is possible and can be configured in your system.properties file. (UBNT-JoeHughes)

db.mongo.local=false
db.mongo.uri=mongodb://user:password@host:port/unifi-ace
statdb.mongo.uri=mongodb://user:password@host:port/unifi-ace_stat
unifi.db.name=unifi-ace

Q: How do I update DNS hostnames after editing the hosts file on my USG?

You can restart dnsmasq with a force-reload and it will re-read the hosts file. (unifimynet)

sudo /etc/init.d/dnsmasq force-reload

Q: Can I make my custom scripts persist through upgrades on the USG?

Yes, store them in the /config/scripts folder to persist across firmware upgrades. (unifimynet)

Q: The fans on my UniFi device are too loud, can I make them quieter?

Yes, by installing replacement fans from Noctura. (osunifi)

Helpful UBNT Articles

USG Config File Examples

S2S VPN when public IP is on modem by JP1008

{
  "vpn": {
    "ipsec": {
      "site-to-site": {
        "peer": {
          "<usg.wan.ip.address>": {
            "authentication": {
              "id": "<modem.public.ip.address>"
            }
          }
        }
      }
    }
  }
}

mDNS Repeater by SprockTech

{
  "service": {
    "mdns": {
      "repeater": {
        "interface": [
          "eth1.100",
          "eth1.110"
        ]
      }
    }
  }
}

Disable NAT masquerade by UBNT-cmb

{
  "service": {
    "nat": {                                       
      "rule": {                   
        "5999": {                        
          "exclude": "''",        
          "outbound-interface": "eth0",
          "type": "masquerade"
        }
      }
    }
  }
}

Redirect DNS requests by UBNT-AdamD

{
   "service":{
      "nat":{
         "rule":{
            "1500":{
               "destination":{
                  "port":"53"
               },
               "inbound-interface":"eth1.5",
               "inside-address":{
                  "address":"192.168.5.1"
               },
               "protocol":"tcp_udp",
               "type":"destination"
            }
         }
      }
   }
}

Static IP assignment for VPN clients based on solution shared by jdtemple911

{  
   "service":{  
      "radius-server":{  
         "user":{  
            "bob":{  
               "ip-address":"192.168.10.10"
            }
         }
      }
   }
}

Quick Tips and Tricks

Use MongoDB 3.6.x or newer by bkohler

mv /usr/bin/mongod /usr/bin/mongod.bin
touch /usr/bin/mongod
chmod +x /usr/bin/mongod
vi /usr/bin/mongod

/usr/bin/mongod:

#!/bin/bash
cleaned_args=$(echo $* | sed -e 's/--nohttpinterface//')
/usr/bin/mongod.bin ${cleaned_args}

Delete a ghost admin account by SprockTech

mongo --port 27117 ace --eval 'db.admin.deleteOne({"email": "[email protected]"})'

Clear invalid “connectivity” settings in the database by SprockTech

mongo --port 27117 ace --eval 'db.setting.deleteMany({key: "connectivity", site_id:{$exists: false}})'

Advanced Walkthroughs

Community Projects

Misc