Skip to main content
How to enable reverse tunnel

Learn how to use Spotipo if you UniFi controller/UDM/CK does not have a public IP

Rakesh Mukundan avatar
Written by Rakesh Mukundan
Updated over a month ago

If your UniFi controller/ Cloud Key/ UDM/ UDR does not have a public IP you, you won't be able to use an external portal solution like Spotipo. However we now have a reverse tunnel solution that will help you in such situation.

The solution works by creating a reverse SSH tunnel from your controller to our server, so that we can access your controller.

Enable SSH access on your UDM/CK/UDR

If you are using a software controller, ie UniFi controller running on a server, skip this.

Make sure to login to your device by going to https://<it's local IP>, and navigate to Console Settings.

Enable Remote Access and SSH, use the Change Password option to set a password.

SSH into your controller

Using your favorite SSH terminal, log in to the UniFi controller. If you got a CK/UDM/UDR etc use root as username and the password you set above.

Install autoSSH

We will use autossh to keep the connection active, install the same using below command after logging into the controller.

apt install autossh

Generate SSH Keys

Check if you already have a set of SSH keys under /root/.ssh/id_rsa.pub if not create them using the command

ssh-keygen

And then copy the content of /root/.ssh/id_rsa.pub and send to us via chat. In return we will assign a USERNAME to you.

Proceed to the next steps once you have a USERNAME from support.

Login to the server again and execute below command, replace <USERRNAME> with actual username

bash <(curl -L -s https://gist.githubusercontent.com/rakeshmukundan/f128a4e69c2e20a3f3f42f884de04aa3/raw/63ba7929d186b3972983f171ce8490a1f31e3e3d/install_tunnel) <USERNAME>

You should be seeing something like below

Now you should be able to use <USERNAME>.spotipo.cloud as the Hostname for your server in the Settings tab.

Did this answer your question?