Add Default Gateway Route to Unifi from the Command Line on SSH
-
Change the IP for your needs:
First:
configure
Then:
set protocols static route 0.0.0.0/0 next-hop 10.0.0.1 description default
Or:
ip route add default via 10.0.0.1
When you set the default gateway route on a Ubiquiti Unifi USG via SSH, it can be pretty frustrating because nothing from Ubiquiti gives the proper syntax for the command, but you'll find so many false examples from older versions. So here is the format so that it is easy to find!