INTRODUCTION

Azure Point to Site (P2S) VPN gateway helps to have a secure connection with Azure virtual machines through individual client computers. Leveraging this option, the VM owners can access the Azure VMs from remote locations. Point to Site VPN (P2S) is the best option to choose when only a few clients are required to connect to the Azure Virtual Network. There are two types of authentications used in P2S VPN gateway, “Radius Authentication” and “Azure Native Certificate Authentication”.

P2S connection with “Radius authentication” involves additional infrastructure such as RADIUS server, VPN client, and also involves additional administrative efforts; whereas, the “Azure Native Certificate Authentication” involves Certificate generation and less administrative efforts. “Azure Native Certificate Authentication” has two different types of certificates - “Root Certificate” & “Client Certificate”. The initial certificate generated by the Azure administrator is the ‘Root Certificate’ using which the ‘Client Certificate’ can be generated. The administrative efforts involve simple steps, such as uploading the certificate data and revoking the certificate.

The following steps will help to generate the Root certificate and upload on the Azure portal through PowerShell from a Windows 10 machine.

CREATE, UPLOAD, & CONNECT

Step 1

Azure

$cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature -Subject "CN=P2SRootCert" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign

The above command creates a self-signed root certificate named “P2SRootCert” and is automatically installed in 'Certificates-Current User\Personal\Certificates'.

Azure

SUMMARY

In this article, I have explained about creating, uploading, and installing the Azure P2S root certificate.

P2S root certificate can be used to generate the P2S client certificate. The generated root certificate and client certificate cannot be used unless the root certificate is uploaded to the Azure portal. The Azure administrator will have access to revoke the uploaded certificate from the Azure portal.