Routers
Ubiquiti Ubiquiti Jun 15, 2026
Posted Mon, Jun 15, 2026 1:08 PM
Edited Mon, Jun 15, 2026 1:08 PM

How to setup OpenVPN on UniFi gateways

This guide was created by a community member and reviewed by us. Firmware and router interfaces may change over time, so some steps may differ depending on your device or version.

Prerequisites:

  • UniFi OS version 5.1.15 or above
  • UniFi Network App version 10.4.57 or above

Setup

  1. Download the OpenVPN configuration from the website. Make sure it's the Linux
    version.

  2. The configuration requires a small tweak:
    The protocol needs to be forced to IPv4 by modifying the remote setting
    to udp4.

    From:

       ....
    
       remote no.gw.xeovo.com 1196 udp
    
       ....

    To:

       ....
    
       remote no.gw.xeovo.com 1196 udp4
    
       ....
  3. Open the UniFi console. By default, it is accessible at either
    [https://192.168.0.1] or [https://unifi]

  4. Click the gear icon to open the settings page

  5. Open the VPN section

  6. Press the "Create New" button within the "VPN Client" box

  7. Make sure configuration type is set to OpenVPN

  8. The name can be anything you want

  9. Click on the Upload Configuration File hyperlink. Upload the edited
    configuration from step 2

  10. Make sure to select Network and then Select All. This is very important.

  11. Enter your credentials. These are the same you use to login to the website.

  12. Press Create - You're done. To verify connection visit DoesMyVPN.work

Additional (optional) notes

Device and Content Wizards

The Device and Content Wizards allow you to define policies to choose what
is routed through the VPN. They can be very useful if you don't want your whole network
to go through the VPN, but just a few devices, or all the traffic to a specific domain or
region.

In the current version of UniFi Network, there is no any option for these two wizards,
and the author has not managed to make the VPN work without either a device or a content
policy defined. This is why we used Select All in the networks in step 10.

It's possible to edit the policy after it's created to conjure an any option.
To see this, simply click on the VPN name, and then click on the VPN
name again in the Associated Policies section.

Kill Switch

The kill switch option disables internet access in the VPN connection drops. This is
highly recommended.