Ubiquiti · VPN

Ubiquiti UniFi Cloud Gateway Ultra VPN client or server will not connect

Ubiquiti UniFi Cloud Gateway Ultra VPN client or server will not connect: provider/server, credentials, protocol, DNS, MTU, policy route and double NAT should be isolated. Scoped to UCG-Ultra.

A VPN on a UniFi Cloud Gateway Ultra can mean two things: a VPN server that lets you reach your home network from outside, or a VPN client that sends some or all of your traffic out through a provider, and both are set up in the UniFi Network application under VPN. For a remote-access server, UniFi offers WireGuard, OpenVPN and L2TP, and Teleport, Ubiquiti's one-click option, as the product's feature list states. A server that does not connect has a short set of causes. The first is the WAN address: the Ultra must have a public address, since a provider using carrier-grade NAT or a router in front blocks inbound connections, and the application shows the WAN IP.

The checks in more detail

If it is a private address, the VPN cannot receive connections until you fix the double NAT, as the double-NAT page explains. The second cause is the address the clients use: if your public address changes, use a dynamic DNS name, and make sure the clients point to it. Third, check that the VPN's port is open on any device in front and that the Ultra's firewall allows the VPN traffic, which the application creates automatically. For speed, a VPN is limited by the Ultra's processor.

Encrypted traffic is slower than plain routing, and with IDS/IPS also on, throughput falls further, as owners on the Ubiquiti community report, so test the VPN with threat management off to see the difference. WireGuard is generally faster than OpenVPN on this class of hardware. For a client VPN to a provider, check that the policy-based routing sends the right devices through the tunnel and that DNS does not leak. If a site-to-site tunnel drops, match the settings on both ends, such as the encryption, the subnets and the lifetimes, and make sure the subnets do not overlap, for example both using 192.168.1.0. Update the gateway and application.

Check the logs in the application for errors. If clients connect but cannot reach devices, check the allowed subnets and the firewall rules between the VPN network and your LAN. Use strong keys and remove unused clients. Remember to review the list of VPN clients every few months and delete the ones you no longer use. Each client holds a key that can reach your network, so a phone you sold or a laptop you replaced should lose its access. If you share a client with family, create separate ones so that you can revoke each separately. Check the gateway's logs for connection attempts from unfamiliar addresses and keep the application updated.

Differential

Likely causes of “Ubiquiti UniFi Cloud Gateway Ultra VPN client or server will not connect”, and how to tell them apart

  1. 1

    A private WAN address

    What separates it Remote VPN clients cannot connect

    How to confirm Fix double NAT or CGNAT

  2. 2

    A changing public address

    What separates it The VPN works then stops

    How to confirm Use dynamic DNS

  3. 3

    IDS/IPS and encryption together

    What separates it The VPN is slow

    How to confirm Test with threat management off

  4. 4

    Overlapping subnets

    What separates it A site-to-site tunnel fails or cannot route

    How to confirm Use different subnets at each site

  5. 5

    Firewall rules

    What separates it Clients connect but cannot reach devices

    How to confirm Check the rules between VPN and LAN

Before you touch a setting

Record this first — changing settings destroys the evidence

  • The VPN type
  • The WAN address
  • The subnets at each end
  • Errors in the logs

Try in this order

0 of 6 completed
  1. Check the WAN address

    Reversible

    Public or private.

  2. Use dynamic DNS

    Reversible

    If it changes.

  3. Pick WireGuard

    Reversible

    For speed.

  4. Check the subnets

    Reversible

    For overlap.

  5. Check the firewall

    Reversible

    Rules between networks.

  6. Read the logs

    Reversible

    For errors.

Model-specific

What is true of this model and not of its siblings

Subnets
They must not overlap between sites.
Processor
Encryption is limited by the gateway's CPU.

Stop boundary

When this stops being a self-service repair

  • !If the VPN fails with a public address and correct settings, contact Ubiquiti
  • !If the address is CGNAT, contact the provider
  • !Update the gateway

Evidence ledger

Sources behind this answer

Exact questions

Common questions

Why will my UniFi VPN not connect?+

A private WAN address or a wrong address.

Which VPN is fastest?+

WireGuard.

Why is it slow?+

Encryption plus IDS/IPS.

What is Teleport?+

Ubiquiti's one-click remote access.

Wrong device or version?

Match the path before repeating the steps.

Match another device