Search code examples
azureazure-virtual-networkazure-vpn

Remove Point to Site from Virtual Network Gateway


I have a Virtual Network Gateway that I created for Site-to-Site VPN, I ended up enabling Point-to-Site by using the "Point-to-Site Configuration" but this caused issues with my existing site-to-site VPN, but now I have no way of removing the point to site setup, I cant even remove the Address Pool. Any help would be appreciated.

When trying to remove the address pool, but I get the following error:

Failed to save virtual network gateway ''. Error: The VPN client configuration specified for gateway [Gateway] has an invalid IP or CIDR notation


Solution

  • This error might occur if the address pool that you have configured for VPN client has an invalid IP or CIDR notation. It should be a private IP address range that does not overlap with the on-premises location that you connect from, or with the VNet that you want to connect to.

    Just change the address pool to a valid address range, and save Point-to-Site Configuration. The error will disappear.

    If you want to delete a P2S configuration after enabling it, you must first delete each resource that pertains to the virtual network gateway. In this case, you have to remove the virtual network gateway and recreate a virtual network gateway for S2S connection. Also, you can still use the old GatewaySubnet in the same virtual network. For more information, you can refer to this.