Search code examples
azureazure-virtual-networkopenvpnvirtual-network

How to use the privateIPAllocationMethod for vNet Gateway clients


I have seen in my ARM template that this properties is available in the virtual network gateway.

However, the documentation does not seem to explain how to use it.

What I need is to create a virtual network gateway with OpenVPN point to site (up to this point, no problem, it is really easy) BUT I need to be able to configure static IPs for the clients.

The privateIPAllocationMethod look promising but I would expect to see further configuration to describe which client gets which IP.

Any clue?


Solution

  • Currently, it does not support to configure static IPs for VPN clients. Every time a P2S connection goes live, the next available IP is allocated in the address range. Refer to this.

    In fact, the privateIPAllocationMethod is belonged to the ipConfigurations properties in the VirtualNetworkGatewayPropertiesFormat object. What you need is to find the VpnClientConfiguration object, obviously, there is no such attribute to support the static IPs configuration for the clients. See vpnclientconfiguration in the template and the Azure REST API.