A static IP on your UniFi gateway, step by step
What you'll do: add a site in the portal, paste one command into your gateway, open a port, and check it from outside. Here is each step, and how to undo it.
Before you start
- A UniFi gateway, such as a Dream Machine. Ours is a Dream Machine SE.
- SSH turned on: in UniFi, open Control Plane (or Console Settings), turn on SSH and set a password. And a computer to connect from.
- The address of the device you want to reach on your network, and its port.
1. Add the site
Sign in to the TunnelNet portal, add a site and choose UniFi as the router. The site gets its static address.
2. Install the agent
On the site's page, under Install on your UniFi gateway, choose Make my install command. Log in to the gateway over SSH as root and paste the command. It works once, and for 30 minutes. The agent installs itself, connects to us and checks in with the portal.
3. Open a port
In the portal, add the device under Devices behind the router (a name and its address on your network), then open a port on it. You can limit it to the addresses you name. The agent applies it on the gateway, and the port shows Applied once the gateway has it. The portal says to allow about a minute; in our lab, changes worked from outside 7 to 19 seconds later.
4. Check it from outside
From a phone with Wi-Fi off, open the site's address and port. A test from inside your own network doesn't count: it never leaves the building. On the gateway, tnet status says whether all is well, tnet ports lists what's open, and tnet logs shows what the agent did.
Undo
Close a port in the portal to close it on the gateway. To remove TunnelNet from the gateway, run /data/tunnelnet/tn-agent uninstall on it.
If something goes wrong
Email support@minakilabs.com with the output of tnet status.