💾 Archived View for dcreager.net › 2024 › 07 › unifi-usg.gmi captured on 2024-08-18 at 18:05:09. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
2024-07-13
I recently decided to switch back to my Unifi USG as my home router, instead of a stock Linux box. I'm thinking about putting proxmox or something similar on the Linux box.
Readopting the USG onto my existing network turned out to be more work than I expected!
The main reason is that I'm not using the default ‘192.168.1.0/24’. Factory fresh gateways come with a static IP address of ‘192.168.1.1’. That means that it cannot reach the Cloud Key, even when both are plugged into the same switch. You have to give the USG a static address in your actual primary network; at that point adoption should (mostly) work.
Some wrinkles:
$ cat /etc/systemd/network/25-wireless.conf «snip» [Address] Address=192.168.1.10/24 $ sudo ip route add 192.168.1.0/24 dev wlan0
connecting via SSH [Ubiquiti Help Center]
Once that is done you can reach the USG's default address:
$ ssh ubnt@192.168.1.1 ubnt@ubnt:~$ configure ubnt@ubnt:~$ edit interfaces ethernet eth1 ubnt@ubnt:~$ set address [NEW_IP] ubnt@ubnt:~$ commit ubnt@ubnt:~$ exit ubnt@ubnt:~$ exit
Then you can re-SSH in using the new address. (Note that we didn't delete the default address yet! Let's make sure we can use the new address first.)
$ ssh ubnt@[NEW IP] ubnt@ubnt:~$ configure ubnt@ubnt:~$ edit interfaces ethernet eth1 ubnt@ubnt:~$ delete address 192.168.1.1/24 ubnt@ubnt:~$ commit ubnt@ubnt:~$ exit
(Note only a single ‘exit’, since we're about to adopt the USG!)
all the network configuration pieces spread out in different comments
At this point, you can do a “Layer 3 remote adoption”:
[still logged into USG] ubnt@ubnt:~$ set-inform http://[CLOUD KEY IP]:8080/inform
Remote Adoption (Layer 3) [Ubiquiti Help Center]
You should keep your old router plugged in since part of the adoption process is updating the USG's software, which requires an active Internet connection. I watched the process closely, and in the Unifi Network web UI you can see when the USG switches its IP address from the one you gave it above to the gateway address for your network. At that point, power down your old router and move the WAN cable over to the USG. It will take a couple of minutes to stabilize, but everything should move over just fine.
I've also seen an interesting suggestion to adopt the new USG into a separate Site in the Controller UI, so that it doesn't try to take over the gateway IP address until after it's been updated: