Azure point-to-site VPN assign static IP

秋山 泉 1 Reputation point
2021-12-13T00:39:50.993+00:00

I'm connecting a single server at Site 1 with my Azure virtual network (10.1.0.0/24) via a Point-To-Site VPN connection (192.168.11.0/30).

The problem is that each time the connection drops and is re-dialed, the client's IP changes. I need to connect to the single server from a server on my Azure network with the same IP.

Please note that in 80% of use cases site to site is not applicable because it requires a static ip address,
an open port and a dnat on both sites, and I cannot order to all my customer to provide an ip and so on.

It seems that 'Finally, in azure vpn official documentation, Microsoft says that point to site can be used as a site to site alternative where you do not have public ip on customer side.'

What is current situation.
Is this already supported? or would be supported or still not supported?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,717 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 10,976 Reputation points MVP
    2021-12-14T10:15:20.64+00:00

    Hello @秋山 泉

    There is no simple solution to solve your problem, as unfortunately assigning static IP addresses to VPN clients with P2S VPN isn't currently supported.

    Please see similar question. https://learn.microsoft.com/en-us/answers/questions/234465/azure-p2s-vpn-assign-static-ip.html

    However there is a complex solution, that could help you to achieve your goal - "connect to the single onpremise server from a server on my Azure network with the same IP"

    • Create a private DNS zone mydomain.com on Azure and point it to your Azure virtual network with VM https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal
    • Create Task Scheduler on onpremise server( Running interval every 6 hours) to run a Powershell script that will Get VPN IP address and register A DNS name computer1.example.com in Azure Private DNS New-AzPrivateDnsRecordSet -Name computer1 -RecordType A -ZoneName mydomain.com -ResourceGroupName MyAzureResourceGroup -Ttl 3600 -PrivateDnsRecords (New-AzPrivateDnsRecordConfig -IPv4Address "Local VPN IP address"
    • Azure VM will connect to on-premise computer using DNS name computer1.example.com
    2 people found this answer helpful.