Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

PART 7.1: MICROSOFT AZURE POWERSHELL VPN CONNECTION IN VIRTUAL NETWORK GATEWAY

As these series also includes Microsoft Azure Powershell tutorial, I will delete existing connection and create new one using Powershell. As shown in earlier chapters I brought all the related networking pieces together for association and created VPN tunnle connection. I will store Virtual Network Gateway and Local network gateway information in Variables so I can use them in next commands.

This command stores existing Virtual Network Gateway information earlier created in this chapter.
$VNG = Get-AzureRmVirtualNetworkGateway -Name POC-VPN_VirtualNetworkGateway -ResourceGroupName POC-VPN

This command stores existing Local Network Gateway.
$LNG = Get-AzureRmLocalNetworkGateway -Name POC-VPN-LocalGateway -ResourceGroupName POC-VPN

Get-AzureRmVirtualNetworkGateway Get-AzureRmLocalNetworkGateway Microsoft Azure VPN connection Powershell

New-AzureRmVirtualNetworkGatewayConnection is the cmdlet where I am bringing all the information together. and these are the Parameters I have used.
-Name: Name of the new connection
-ResourceGroupName:  Existing Resource Group
-VirtualNetworkGateway1: This is existing Virtual Network Gateway and information is stored in $VNG as above screenshot.
-LocalNetworkGateway2: This is existing Local Network Gateway and information is stored in $LNG as above screenshot.
-ConnectionType: IPSec means Site-to-Site VPN connection.
-Sharekey: is the password we created on on premises microsoft RRAS demand-dial router server.
-Location: is mandatory parameter

New-AzureRmVirtualNetworkGatewayConnection -Name PocVPNtoRRAS -ResourceGroupName POC-VPN -VirtualNetworkGateway1 $VNG -LocalNetworkGateway2 $LNG -ConnectionType IPsec -SharedKey AzurePa55w0rd -Location 'East US 2'

Microsoft Azure new-Azurermvirtualnetworkgatewayconnection localnetwokgateway virtualnetworkgateway connection type ipsec shared key vpn BGP transfer Peer

A VPN connection securely connects two Azure virtual networks, or a virtual network and your local network using Internet Protocol security (IPsec). It can also be used to connect a virtual network to an ExpressRoute circuit. Traffic between the two networks is encrypted by one gateway and decrypted by the other, to protect data when transmitted via the Internet.

A connection consists of different components depending on the connection type. When configuring a connection between two virtual networks, also known as a VNet-to-VNet connection, each network contains a virtual network gateway. The two virtual networks can be in different regions and subscriptions, and different deployment models. For example, use a VNet-to-VNet connection to connect a Classic virtual network to one deployed using Resource Manager.

When configuring a connection between a virtual network and your local network, also known as a site-to-site connection, the virtual network contains a virtual network gateway for the Azure side of the VPN connection, and a local network gateway represents the hardware or software VPN device on your side. The connection wizard creates the right resources depending on the connection type.

I hope this is informative in simple language and spread the knowledge.

PART 1 : MICROSOFT AZURE CREATION AND CONFIGURATION OF VPN TUNNEL SERIES
PART 2 : MICROSOFT AZURE CREATING RESOURCE GROUP 
PART 3 : MICROSOFT AZURE CREATING AND ADMINISTERING VIRTUAL NETWORK (VNET)
PART 3.1 : MICROSOFT AZURE POWERSHELL CREATING AND ADMINISTERING VIRTUAL NETWORK (VNET)
PART 4 : MICROSOFT AZURE CREATING AND ADMINISTRATING LOCAL NETWORK GATEWAY VPN
PART 4.1 : MICROSOFT AZURE POWERSHELL CREATING AND ADMINISTRATING LOCAL NETWORK GATEWAY 
PART 5: VIRTUAL NETWORK GATEWAY DEPLOYMENT ON MICROSOFT AZURE
PART 5.1: VIRTUAL NETWORK GATEWAY DEPLOYMENT USING MICROSOFT AZURE POWERSHELL
PART 6: INSTALLING ROUTING AND REMOTE ACCESS SERVER ROLE (MICROSOFT RRAS)
PART 6.1: CONFIGURING ROUTING AND REMOTE ACCESS SERVER DEMAND-DIAL (MICROSOFT RRAS AZURE VPN)
PART 6.2: CONFIGURING ROUTING AND REMOTE ACCESS SERVER ROUTER (MICROSOFT RRAS AZURE VPN)
PART 7: MICROSOFT AZURE CREATE CONNECTION IN VIRTUAL NETWORK GATEWAY
PART 7.1: MICROSOFT AZURE POWERSHELL VPN CONNECTION IN VIRTUAL NETWORK GATEWAY
PART 8: MICROSOFT AZURE ARM AND POWERSHELL CREATING AND MANAGING STORAGE ACCOUNT
PART 9: CREATING AND MANAGING VIRTUAL MACHINE (VM) USING MICROSOFT AZURE RESOURCE MANAGER PORTAL

Some Useful Links
MICROSOFT AZURE ERROR REGISTERING RESOURCE PROVIDERS CODE AUTHORIZATION FAILED 
INSTALLING MICROSOFT AZURE POWERSHELL

Go Back

Comment

Blog Search

Page Views

12056144

Follow me on Blogarama