Creating root certificate and client certificate to establish a VPN connection to cloud from On premises.

Creating root certificate and client certificate to establish a VPN connection to cloud from On premises. We can run the below commands from power shell


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

<#
  We are generation a Client certificate from root certificate. After you are creating this go to certmgr.msc(run this command from command propmpt)
#>
New-SelfSignedCertificate -Type Custom -DnsName REBELCLIENT -KeySpec Signature `
-Subject "CN=CLIENTCERTIFICATE" -KeyExportPolicy Exportable `
-HashAlgorithm sha256 -KeyLength 2048 `
-CertStoreLocation "Cert:\CurrentUser\My" `
-Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2")


Get-ChildItem -Path “Cert:\CurrentUser\My”

After that export these two certificate to another drive and another folder in your system. Install client certificate but root certificate you need to edit that in notepad and upload that to "point to site" configuration provided that info under public certificate data

Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server