The router has support for the OpenVPN Protocol with the built-in openvpn2 Client. Even if the GUI does not provide the Client connection for OpenVPN Cloud profiles, you can take advantage of the CLI to launch the connection.
Note: The openvpn2 Client does not support Domain routing features. Hence, Domain routing over the VPN would not work for this kind of connection.
- SSH into the UDM Pro router with the root and the password credentials you have set under "Console Settings."
- Install the udm-boot utility to allow running scripts on the boot. Allowing to run a script that will initiate the VPN connection if the device is restarted:
curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/HEAD/on-boot-script/remote_install.sh"| /bin/sh
- Go to the Host or Network configuration in OpenVPN Cloud and scroll down to the Connector section to download the Profile. E.g.:
- Open the Profile with a text editor and paste the content with VIM into your router's /mnt/data folder.
sudo vim /mnt/data/profile.ovpn
In VIM, Press "i" to enter insert mode and paste the content. To Exit and Save changes, press the "ESC" key, then type ":wq!".
- In the /mnt/data/on_boot.d/ use VIM again to create a script file and give the required privileges to execute:
sudo vim /mnt/data/on_boot.d/boot-vpn.sh
Using the same process from step 4, paste the following script content:
#!/bin/sh
And provide the necessary privileges with the following command:
nohup openvpn --config /mnt/data/profile.ovpnchmod +x boot-vpn.sh
- Test the VPN Connection by rebooting the device and verifying the Host or Network Status in the OpenVPN Cloud Portal.
Comments
0 comments
Please sign in to leave a comment.