Configure Static IP Address for Point-to-site VPN in Azure - azure

How to configure Point-to-Site VPN with a Static IP address as my applications are dependent on a static IP address given out by the VPN Gateway. Is it even possible with Point-to-site? What about options like ExpressRoute and Site-to-Site VPN?

As of now assigning Static IP for P2S is not possible. Please raise your feedback via User Voice: https://feedback.azure.com/forums/217313-networking
If you are using options like Site to Site or Express Route, Azure will not lease IP address and basically it connects to the Peer Address Prefix. So you can deploy your Application on On-Premises Server and make that Server IP static to address your issue.

Related

Issue with the Public IP Address when Connected to the VPN Client

We have created an Azure VPN and configured it with the VPN Client before connecting to the VPN the public IP address which is there is similar to the IP address after connecting to the VPN.
• I would suggest you to please check the type of VPN connection that you have configured in your environment, i.e., P2S or S2S VPN connection. Because, in both the type of VPN connection, the VPN Gateway subnet, i.e, the client address pool defined in the VPN Gateway from which the connecting VPN clients pick up IP addresses for the connection has a public IP address or a FQDN published for the purpose of discovering the VPN Gateway and the inherent connection to be established to it.
• Thus, each VPN gateway has a public IP published along with its configuration to which the VPN clients connect with the required configuration post which successful authentication takes place and the clients are assigned an IP address from the gateway subnet. Thus, the VPN clients have two IP addresses, one is the public IP address or the DHCP client address obtained from the internet connecting router and the second is the IP address from the VPN Gateway subnet.
• Hence, after connecting to the VPN gateway subnet, only those resources are accessible which are allowed to be connected through the VPN Gateway subnet with the correct level of authentication approved for these resources.
For more information regarding the issues that you might be facing, kindly refer to the documentation link below for further steps and resolution: -
https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-troubleshoot-vpn-point-to-site-connection-problems
https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-troubleshoot-site-to-site-cannot-connect

Is there a VPN solution in Azure that can assign a static public IP to the clients connected for me to achieve full tunnelling? may be in P2S VPN?

Is there a VPN solution in Azure that can assign a static public IP to the clients connected for me to achieve full tunnelling? may be in P2S VPN?
P2S VPN does not have full tunneling. Is there any other alternate solution?
• No, you can’t assign a static public IP address to the clients for a VPN solution in Azure as the client address pool that needs to be defined while deploying a VPN gateway in Azure is a subnet of the IP address spaces that the virtual network is created out of.
But you can configure forced tunnelling in your Azure virtual network on your VPN gateway subnets as illustrated below. In the below image, forced tunnelling is shown for Site-to-Site VPN scenario but it can also be implemented for Point-to-Site VPN scenarios in the same way. The Frontend subnet is not force tunneled. The workloads in the Frontend subnet can continue to accept and respond to customer requests from the Internet directly. The Mid-tier and Backend subnets are forced tunneled. Any outbound connections from these two subnets to the Internet will be forced or redirected back to an on-premises site via one of the Site-to-site (S2S) VPN tunnels as shown below.
This allows you to restrict and inspect Internet access from your virtual machines or cloud services in Azure, while continuing to enable your multi-tier service architecture required. If there are no Internet-facing workloads in your virtual networks, you also can apply forced tunneling to the entire virtual networks.: -
• Also, please note that you can *configure the above for your P2S clients by securing the Internet traffic via Firewall Manager and advertising the 0.0.0.0/0 route to your VPN clients. This makes your clients send all internet bound traffic to Azure for inspection. Then, firewall SNATs the packet to the PIP of Azure Firewall for egress to Internet. For this purpose, setup the Azure Firewall Policy to allow P2S traffic to Internet and to advertise all the traffic from 0.0.0.0/0 to your VPN clients, you would need to break them into two smaller subnets 0.0.0.0/1 and 128.0.0.0/1 as mentioned in the below documentation: -
https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-p2s-advertise-custom-routes#forced-tunneling
Also, you can add the code below in your ‘azurevpnconfig.xml’ file that can be directly downloaded from the templates section if the above said subnets cannot be added in ‘Default Routes’ on the portal.
<clientconfig>
<includeroutes>
<route>
<destination>0.0.0.0</destination><mask>1</mask>
</route>
<route>
<destination>128.0.0.0</destination><mask>1</mask>
</route>
</includeroutes>
</clientconfig>

How to assign a static VPN private ip to client over Azure Basic P2S VPN

Can anyone suggest how to assign a static IP from VPN private IP range to the client for Azure basic P2S VPN connection. Also if anyone can guide me if I can connect the Azure VM to on-premise client VM over the on-premise network private IP
Assigning static IP addresses to VPN clients with P2S VPN isn't currently supported.
When client connects to P2S the next available IP is allocated.
You can raise your feedback via User Voice:
https://feedback.azure.com/forums/217313-networking/suggestions/33929980-static-ip-for-vpn-client-over-azure-p2s-solution
https://learn.microsoft.com/en-us/answers/questions/234465/azure-p2s-vpn-assign-static-ip.html

Azure app service - routing traffic through vnet - does IP translation take place?

I have an azure app service with a web job that grabs data from a web service. The networking properties show that the webjob has a few outbound IPs, which are public Azure IP addresses.
I know that the web service app can be configured to route traffic through a VNET, however, it's not clear to me if the IP is translated to a local IP in the VNET, or if the Azure public IP remains. This obviously has implictions if there are firewalls on the network that block external IP's. Would this also mean that the return route could be over the internet rather than through the network? (espseically if the traffic end's up going down a VPN and outside of Azure - surely a 40. something public azure address would then force a return over the internet, which may not always be possible).
it's not clear to me if the IP is translated to a local IP in the
VNET, or if the Azure public IP remains.
As far as I know, when we use public IP address to communicate the internet, the public IP address will not translated to a internal IP.
I think this might cause an issue when using this with a VPN as I'm
not sure how the return path would know to use the VPN rather than
route over the internet.
When we use Azure P2S or S2S VPN, we can't force the internet traffic through the VPN tunnel.
Update:

VPN Information for Azure VM

I have set up a new virtual machine and added it to a virtual network.
Now my difficulty is what will be the VPN Peer IP Address I'll share with clients? Is it the public IP of my virtual machine?
Also the VPN host IP address? Is that the public IP as well? All these have me confused as I have to provide them to our clients.
Where can I find these info on Azure?
You have to create two Gateways for a Site-to-Site VPN connections:
1) a Virtual Gateway which will serve es public endpoint for the other site (network)
2) a Local Gateway which "mocks" the public endpoint of the other site (network)
It is explained quite good here: https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-howto-site-to-site-resource-manager-portal/ - You need to check the compatibilities between Azure and the VPN device (check https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-about-vpn-devices/)

Resources