Crear VPN sku Basic - PowerShell

https://learn.microsoft.com/es-es/azure/vpn-gateway/create-gateway-basic-sku-powershell

  1. Crear un grupo de recursos:
    1. New-AzResourceGroup -Name "MiGrupoDeRecursos" -Location "EastUS"


  2. Crear una red virtual:
    1. $vnet = New-AzVirtualNetwork -ResourceGroupName "MiGrupoDeRecursos" -Location "EastUS" -Name "MiVNet" - AddressPrefix "10.1.0.0/16"

  3. Crear una subred de puerta de enlace:
    1. Add-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix "10.1.255.0/27" -VirtualNetwork $vnet Set-AzVirtualNetwork -VirtualNetwork $vnet
       
  4. Crear una dirección IP pública:
    1. $pip = New-AzPublicIpAddress -ResourceGroupName "MiGrupoDeRecursos" -Location "EastUS" -Name "MiPublicIP" -AllocationMethod Dynamic

  5. Crear la puerta de enlace de red virtual:
    1. $gwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name "GwIpConfig" -SubnetId $vnet.Subnets[0].Id -PublicIpAddressId $pip.Id New-AzVirtualNetworkGateway -ResourceGroupName "MiGrupoDeRecursos" -Name "MiVNetGateway" -Location "EastUS" -IpConfigurations $gwipconfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Basic
Cuando vas ejecutando cada comando los recursos van apareciendo en el portal Azure, luego de creda la puerta de enlace visualmente en el portal podemos crear los túneles 

¿Le ha resultado útil este artículo?