Azure

Upgrading The IPsec/IKE Coverage To The Azure Website-To-Website VPN Connection Utilizing The PowerShell Command

Introduction

 

There are a number of industries which can be utilizing Microsoft Azure to deploy their server or companies, to get excessive efficiency, and dependable companies.

 

The IPsec and IKE protocol commonplace helps a variety of cryptographic algorithms in numerous mixtures. The IKEv1 connections are permitting for Fundamental SKUs solely, and the IKEv2 connections are permitting for all VPN gateway SKUs. The IKEv2 protocols are permitting larger commonplace VPN algorithms and key values.

 

On this article, we’re going to learn to configure an IPsec/IKE coverage for site-to-site (S2S) VPN connections utilizing the PowerShell ISE.

 

Step 1

 

Earlier than upgrading the Connection, please confirm the next steps are configured within the Azure portal.

  • Digital Community
  • Gateway subnet
  • VPN Gateway
  • Native Community Gateway
  • VPN connection
In case you are not configuring the VPN setup please comply with this hyperlink, to study Implementing Azure Website To Website VPN.

 

Step 2

 

Within the Azure Portal, go to the right “Useful resource group” after which open the “VPN Connection”.

 

 

Step 3

 

Discovering the right parameters to enter the PowerShell script.

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command
  • $RG1 = Useful resource Group Identify – Copy the Useful resource Group Identify “Website-1”
  • $connection1 = VPN Connection Identify – Copy the VPN Connection Identify “Site1-to-Site2”
  • $connection2 = Get the VPN Connection to assign the parameters
  • $ipsecpolicy1 = Assigning the IKEv2/IPsec Parameters
  • $connection2.SharedKey = VPN Connection Pre-Shared Key Data – Copy the Shared Key
  • $connection2.IpsecPolicies= Confirm the Connection Standing

Step 4

 

Outline the parameters in accordance with the client’s requirement.

  1. $RG1=“Website-1”  
  2. $connection1=“Site1-to-Site2”  
  3. $connection2=Get-AzureRmVirtualNetworkGatewayConnection-Identify$connection1-ResourceGroupName$RG1  
  4.   
  5. $ipsecpolicy1=New-AzureRmIpsecPolicy-IkeEncryptionAES256-IkeIntegritySHA256-DhGroupDHGroup2-IpsecEncryptionAES256-IpsecIntegritySHA256-PfsGroupPFS2-SALifeTimeSeconds28800-SADataSizeKilobytes102400000  
  6. $connection2.SharedKey =“asd@@123456@@asd”  
  7.   
  8. Set-AzureRmVirtualNetworkGatewayConnection-VirtualNetworkGatewayConnection$connection2-IpsecPolicies$ipsecpolicy1  
  9. $connection2=Get-AzureRmVirtualNetworkGatewayConnection-Identify$connection1-ResourceGroupName$RG1  
  10. $connection2.IpsecPolicies   

Step 5

 

Join the Azure portal utilizing the PowerShell ISE, Sort Join-AzureRmAccount after which Click on Run Choice (F8). Within the Credentials dialog field enter your electronic mail handle and the password.

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Step 6

 

Now you’ll be able to confirm that you’re efficiently logged in to Azure, be certain it is the right “Subscription”. If the subscription is mistaken choose the right subscription utilizing the next command: Choose-AzureRmSubscription”Subscription Identify”

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Step 7

 

Run the next instructions step-by-step

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Step 8

 

Run the “Set-AzureRmVirtualNetworkGatewayConnection” the command to use the IPsec/IKEv2 parameters whenever you run the command the Overwrite affirmation dialog field will seem, hit Sure to use the parameters.

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Step 9

 

Now we are able to confirm the connection has been upgraded to the brand new parameter utilizing the beneath command.

 

Upgrading the IPsec/IKE policy to the Azure Site-to-Site VPN Connection using the PowerShell Command

 

Abstract

 

On this article, we’ve got realized the right way to improve the VPN Connection parameters utilizing the PowerShell instructions, in our subsequent article we are going to learn to configure the VPN Connection Parameters utilizing the Azure Portal.

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button