How do you create an Azure VPN Gateway with a Basic SKU?

When creating a VPN Network Gateway in the Azure Portal, the options have been limited to SKU VpnGw1 and above costing around €140 per month.

Microsoft do provide a SKU for a Basic VPN Gateway which is what most SMEs require and costs around €25 per month, the only current way to create this is with PowerShell.

The steps to do this are:

Install Az PowerShell

Run the following commands in an elevated PowerShell window.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module -Name Az -Repository PSGallery -Force
Create the Virtual Network and Subnet

If you haven’t already, create a virtual network and add a Gateway Subnet. Make a note of the Resource Group name and vnet name as these will be used later to create the VPN Gateway.

Connect to Azure via PowerShell

You will be prompted to login to Azure. Login with a user that has permissions to create VPN Gateways.

Setup Variables

Type the following into the PowerShell commands, change the Resource Group name and the vnetName value to match your Resource Group and Virtual Network name. Change the location to be the same as your Virtual Network. Change the other values to suit your naming conventions.

$location = 'northeurope'
$resourceGroup = 'MyVNetRG'
$vnetName = 'MyVnet'
$publicipName = 'MyPublicIP'
$gatewayName = 'MyVnetGW'
Create the VPN Gateway

Use the following commands that will create a Resource Group, Public IP and VPN Gateway.

$vnet = Get-AzVirtualNetwork -ResourceGroupName $resourceGroup -Name $vnetName
$subnet = Get-AzVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork $vnet
$publicip = New-AzPublicIpAddress -Name $publicipName -ResourceGroupName $resourceGroup -Location $location -Sku Basic -AllocationMethod Dynamic
$ipconfig = New-AzVirtualNetworkGatewayIpConfig -Name 'GWIPConfig-01' -SubnetId $subnet.Id -PublicIpAddressId $publicip.Id
New-AzVirtualNetworkGateway -Name $gatewayName -ResourceGroupName $resourceGroup -Location $location -IpConfigurations $ipconfig -GatewayType 'VPN' -VpnType 'RouteBased' -GatewaySku 'Basic'

That’s it, you are now ready to create Connections to your VPN Gateway.

If you require any help with Azure or VPN Gateways then please contact us.

Leave a Comment

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

Professional Package

Basic Package

Standard Package

Choose Plan

Free 30 day no obligation trial

Choose Plan

Free 30 day no obligation trial

Choose Plan

Free 30 day no obligation trial

Choose Plan

Choose Plan

Choose Plan

Free Health Check

Enter your email address for a free  domain and email health check

Free Email Health Check
Scroll to Top