Setting up a point-to-site VPN connection allows you to access the resources deployed inside the virtual network without a public IP address.
Note: The client configuration described in this article is specific to the Mac machine.
On a high level, the following steps are taken to achieve a point-to-site VPN connection:
A gateway subnet is required to configure VPN (point-to-site or site-to-site).

The next step is to create a virtual network a gateway.


Virtual network gateways takes approximately 15-20 minutes to create. In the meantime, you can generate the self signed certificates, which is required to connect to VPN. Note that you can use the enterprise provided certificates as well.
brew install strongswan brew install openssl
ipsec pki --gen --outform pem > caKey.pem ipsec pki --self --in caKey.pem --dn "CN=VPN CA" --ca --outform pem > caCert.pem
caCert.pemin your current working directory. Now we need to open that certificate in Base64 encoded format so that we can copy the certificate and paste it to virtual network gateway.
openssl x509 -in caCert.pem -outform der | base64


export PASSWORD="password"
export USERNAME="client"
ipsec pki --gen --outform pem > "${USERNAME}Key.pem"
ipsec pki --pub --in "${USERNAME}Key.pem" | ipsec pki --issue --cacert caCert.pem --cakey caKey.pem --dn "CN=${USERNAME}" --san "${USERNAME}" --flag clientAuth --outform pem > "${USERNAME}Cert.pem"clientCert.pemand
clientKey.pem.
openssl pkcs12 -in "${USERNAME}Cert.pem" -inkey "${USERNAME}Key.pem" -certfile caCert.pem -export -out "${USERNAME}.p12" -password "pass:${PASSWORD}"
client.p12file in your current working directory.






<?xml version="1.0"?> <VpnProfile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <VpnServer>azuregateway-e85e0077-3dc5-4ee4-b904-d8120d1cc42f-f714bdf2950a.vpn.azure.com</VpnServer> <VpnType>IkeV2</VpnType> <CaCert>MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaF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th>EAPTLS</Auth> <VnetName>Strategy-VNet</VnetName> <VnetId>e85e0077-3dc5-4ee4-b904-d8120d1cc42f</VnetId> <ServerCertRootCn>DigiCert Global Root CA</ServerCertRootCn> <ServerCertIssuerCn>DigiCert Global Root CA</ServerCertIssuerCn> <VpnClientAddressPool>172.18.0.0/24</VpnClientAddressPool> <AadIssuer /> <AadTenant /> <AadAudience /> </VpnProfile




