This article shows you how to configure a Network Connector for UniFi routers using IPsec.
While UniFi routers support OpenVPN, their IPsec Client has better support for site-to-site access and firewall rule management, making it easier to maintain in the long term.
Prerequisites
Admin access to the CloudConnexa portal.
Access to your UniFi admin dashboard.
Have a reachable Public IPv4 address set into the Unifi device.
Create a Network in CloudConnexa
Go to
Networks→Networksand clickAdd Network.
Select
Skip Wizard.
Enter a name for the Network under
Network Details.
For
Connector Tunneling Protocol, selectIPsec.
Under
Connectors, select the CloudConnexaRegionclosest to the UniFi device.
Under
IP Services (optional), add the subnets that the IPsec Connector will have access to.
Note: You can also use an existing Network. Make sure
IPsecis selected under theConnectorssection.
Configure the IPsec Connector in CloudConnexa
Go to the
Connectorssection of the Network and clickConfigure.
In the
Platform to Connectdropdown, selectIPsec Compatible Router: Other.
Under Setup CloudConnexa Tunnel:
Remote Site Public IPv4 Address— enter the WAN IP of the UniFi device. You can find it underSettings→Internetin UniFi.
Authentication Method— selectShared Secret.
Pre-shared Key (PSK)— enter a value of your choice. You will use this same key in UniFi.
Connector Hostname— enter a hostname of your choice (for example,unifi-connector).
Connector Domain— enter a domain of your choice (for example,domain.com). Together, these form the FQDN used as the Local Authentication ID in UniFi (for example,unifi-connector.domain.com). Neither needs to be a real hostname or domain.
Note: Keep this tab open. You will need values from the Remote Tunnel Configuration section when configuring UniFi.
Create the Site-to-Site VPN in UniFi
Go to
Settings→VPN→Site-to-Site VPNand clickCreate New.
Set
VPN TypetoIPsec.
Name— enter a name to identify this VPN connection.
Pre-Shared Key— enter the same PSK you set in CloudConnexa.
Local IP— select the WAN interface IP. This is the same IP you entered in CloudConnexa as theRemote Site Public IPv4 Address.
Remote IP / Hostname— enter theCloudConnexa Gateway Addressshown in the CloudConnexa configuration (also displayed at the top of the page asCloudConnexa Public IP Address).
Under
Network Configuration, setVPN MethodtoRoute Based.
Remote Networks— set toStatic. Add each subnet listed in theRoutesline of the Remote Tunnel Configuration section in CloudConnexa. The line looks like this:
Routes : 192.168.200.0/24, 100.96.0.0/11, 100.80.0.0/12, 10.1.0.0/16
Add each of those subnets as a separate entry.
Set the
Advancedoption fromAutotoManual.
10. Key Exchange Version — select IKEv2.
11. IKE:
Encryption— selectAES-256.
Hash— selectSHA256.
DH Group— select15.
Lifetime— enter28800.
12. ESP:
Encryption— selectAES-256.
Hash— selectSHA256.
DH Group— select15.
Lifetime— enter3600.
13. Local Authentication ID — uncheck Auto, then enter the Connector Hostname + Connector Domain value you set in CloudConnexa (for example, unifi-connector.domain.com).
14. Leave all other settings at their defaults and click Create.
Important: Before testing, verify that the UniFi parameters match those shown in the Remote Tunnel Configuration section of CloudConnexa. Once both sides are configured, go back to CloudConnexa and click
Test Connectionto confirm the tunnel is up.
Comments
0 comments
Please sign in to leave a comment.