Back to articles
Connecting Ubuntu to Azure VPN: The "No-Nonsense" StrongSwan Guide (2026 Edition)
How-ToDevOps

Connecting Ubuntu to Azure VPN: The "No-Nonsense" StrongSwan Guide (2026 Edition)

via Dev.to Tutorialiapilgrim

Tired of OpenVPN "Connection Reset" loops and OpenSSL 3.4 compatibility nightmares? In this guide, we skip the fluff and use strongSwan to build a rock-solid IKEv2 tunnel between Ubuntu and Azure. 1. Provisioning the Network with Azure CLI First, let's build the infrastructure. We need a VNet and a Gateway with a Point-to-Site (P2S) configuration. # 1. Create Resource Group and VNet az group create -n RG-VPN-Lab -l eastus az network vnet create -g RG-VPN-Lab -n VNet-Main --address-prefix 10.0.0.0/16 --subnet-name snet-workload --subnet-prefix 10.0.1.0/24 # 2. Add the Gateway Subnet (Required for the VPN Gateway) az network vnet subnet create -g RG-VPN-Lab --vnet-name VNet-Main -n GatewaySubnet --address-prefix 10.0.255.0/27 # 3. Request a Public IP for the Gateway az network public-ip create -g RG-VPN-Lab -n pip-vnet-gw --allocation-method Static --sku Standard # 4. Create the Gateway (This takes ~20-30 mins) az network vnet-gateway create -g RG-VPN-Lab -n VPNGateway --public-ip-addres

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
22 views

Related Articles