

If our on-premises network changes, we can easily update the prefixes. The address prefixes we specify are the prefixes located on our on-premises network.

We also specify the IP address prefixes that will be routed through the VPN gateway to the VPN device. We give the site a name by which Azure can refer to it, then specify the IP address of the on-premises VPN device to which we will create a connection. The local network gateway typically refers to our on-premises location. New-AzureRmPublicIpAddress -Name VNet01GWPIP -ResourceGroupName myGroup -Location EastUS -AllocationMethod Dynamic Use the following cmd to request a public IP address: The next step is to create a Public IP which must be dynamicallyĪllocated to VPN gateway that we have created for our virtual network. Get-AzureRmVirtualNetworkSubnetConfig -Name GatewaySubnet -VirtualNetwork $vnet To Check if GatewaySubnet has been created successfully type $VirNet = Add-AzureRmVirtualNetworkSubnetConfig -Name GatewaySubnet -AddressPrefix 10.10.90.0/27 -VirtualNetwork $vnet $vnet = Get-AzureRmVirtualNetwork -ResourceGroupName myGroup -Name myVNet01 Use the following cmd to add a gateway subnet: I have already create Resource Group, Vnet, Subnet and a VM by following these articles in Power Shell SectionĪfter creating above things, next step is to add Gateway Subnet that will contain the reserved IP addresses that the virtual network gateway services use. Shared key: For this example, i will use But, you can use whatever is compatible with your VPN hardware.The important thing is that the values match on both sides of the connection. You can use these values to create a test environment.

I will use following values as an example.

None of the subnets of your on-premises network can over lap with the virtual network subnets that you want to connect to. When you create this configuration, you must specify the IP address range prefixes that Azure will route to your on-premises location.Verify that you have an externally facing public IPv4 address for your VPN device.Microsoft Azure does not support all VPN devices so please make sure you have a compatible VPN device as per this article: About VPN Devices.Please consider following points before creating S2S VPN: This article shows you how to create a Site-to-Site VPN gateway connection from your on-premises network Firewall Netscreen SSG140 to the Azure VNet.Ī Site-to-Site VPN gateway connection is used to connect your on-premises network to an Azure virtual network over an IPsec/IKE (IKEv1 or IKEv2) VPN tunnel.
