I have the following network setup through an Azure VPN Gateway:
Windows laptop -> [ OpenVPN Point-to-site ] -> Azure VPN Gateway -> [ IPSec Site-to-site ] -> Fortigate -> On-prem Linux server
There are basically two chained VPNs: one from the laptop to Azure (P2S), and one from Azure to our on-prem network (S2S).
When connecting to the Linux server with SSH, the session hangs as soon as an output packet exceeds 1400 bytes (which happens with any command outputing a large amount of text)
I found two workarounds to solve this problem:
Decrease the MTU on the Linux server with "sudo ip link set mtu 1400" (any value bigger than 1400 doesn't work)
Use a SSH jump box (ProxyJump) on an Azure VM, which forces the SSH connection to go outside the Azure VPN gateway
This makes me think that the Azure VPN gateway doesn't handle MTU properly when a packet is routed directly from a S2S tunnel to a P2S connection, as any other scenario works fine.
Is it a known problem on Azure VPN or am I missing something?
Related
I am setting up an Azure VPN Gateway in order for my Azure VM to connect to a remote RTSP feed, following this documentation: https://learn.microsoft.com/fr-fr/azure/vpn-gateway/tutorial-site-to-site-portal.
What I have done:
Create a virtual network + a subnet and a Virtual Machine
Create the VPN Gateway in the same virtual network
Create a local network gateway with the Public IP and IPs range of the remote network that contains the RTSP feeds
Create the site to site VPN connection with needed shared access key.
The status of the VPN connection is "connected", as you can see in below picture:
Moreover, the subnet on which my azure virtual machine is, is in the same virtual network as the subnet of the VPN Gateway:
From what I understand, as long as the VM is in the virtual network of the Gateway, I should be able to reach the remote network...
Expected behaviour: I should be able to reach the following IP addresses: 192.168.250.30/32 that are on the remote network, from my azure virtual machine.
Actual behavior: From my azure virtual machine, I'm still unable to reach the remote network.
Any ideas where the problem can come from?
If the issue is that the Azure VM's are not getting gateway routes, then a gateway reset should be tried first and the gateway reset needs to be done twice.
Reference :
VPN gateway Reset
References for S2S VPN issues troubleshooting:
S2S VPN cannot connect and stops working
S2S VPN disconnects intermittently
Note : If this doesn’t solve your issue then please reach out to Azure support for more troubleshooting as it may need assisted support by clicking (Support+Help) and creating a technical support request. Please validate your Onprem VPN device as well.
And as Andriy Bilous has mentioned in comments section:
You should see default gateway on your VM routing table. Default Gateway is responsible for routing traffic further. Can you see that
tunnel is UP on your VPN onpremise device.
If no VPN Gateway subnet (10.0.0.0/28) in your VM route table - You may add route to VM using route command. Example: route ADD 10.0.0.0
MASK 255.255.255.240 [Your Gateway IP address]
Here a Data engineer who needs your help to setup a connection to an on-premise environment :)!
I have created a virtual network (10.0.0.0/16) with a default subnet (10.0.0.0/24).
Then I created a (Windows) virtual machine which is connected to the vnet/subnet and has allowed ICMP inbound and outbound rules for the ping test. Ping google.com is no problem.
The next step was to create a Virtual network gateway & Local network gateway to connect to an on-premise environment.
The Local network gateway has an Site-to-site (IPsec) connection to a VPN device from a third party (over which I have no control). Status in the Azure portal = 'Connected'.
The third party is able to ping the Virtual Machine in Azure, the 'data in' property on the VPN connection shows that 2 kb (ping) has been received. So that works!
When i try to send a ping command to the ip-address (within the 'address space' specified from the Local network gateway) the ping command fails (Request timed out.).
After a lot of searching on google/stackoverflow I found out that I need to configure a Route Table in Azure because of the BGP = disabled setting. So hopefully I did a good job configure the Routing Table Routes but still I can't perform a successful ping :(!
Do you guys/girls know which step/configuration I have forgotten or where I made a mistake?
I would like to understand why I cannot perform a successful ping to the on-premise environment. If you need more information, please let me know
Site-to-site (IPsec) connection screenshot/config
Routing Table setup screenshot/config
Routing Table Routes in more detail
If you are NOT using BGP between the Azure VPN gateway and this particular network, you must provide a list of valid address prefixes for the Address space in your local network gateway. The address prefixes you specify are the prefixes located on your on-premises network.
In this case, it looks like you have added the address prefixes. Make sure that the ranges you specify here do not overlap with ranges of other networks that you want to connect to. Azure will route the address range that you specify to the on-premises VPN device IP address. There are no other operations that we can do. We don't need to set UDR, especially we don't associate a route table to the Gateway Subnet. Also, avoid associating a network security group (NSG) to the Gateway Subnet. You can check the route table by selecting Effective routes for a network interface in Azure VM. Read more details here.
If you would like to verify the connection from Azure VNet to an on-premise network, ensure that you PING a real private IP address from your on-premise network(I mean the IP address is assigned to an on-premise machine), you can check the IP address with ipconfig/all in local CMD. Moreover, you could Enable ICMP through the Windows firewall inside the Azure VM with the PowerShell command New-NetFirewallRule –DisplayName "Allow ICMPv4-In" –Protocol ICMPv4. Or, instead of using PING, you can use the PowerShell command Test-NetConnection to test a connection to a remote host.
If the problem persists, you could try to reset the Azure VPN gateway and reset the tunnel from the on-premises VPN device. To go further, you could follow these steps to identify the cause of the problem.
I am trying to connect to a VPN from a Windows VM on Azure and cannot do so. I am using the built-in Windows VPN Client.
I am connecting to this VPN in order to be able to access a server within that VPN and send and receive HTTP Requests.
I have been able to connect to this VPN normally on other devices using the built-in Windows VPN Client. I followed the exact same steps for the VM but receive the following error when trying to connect:
Error 800:The remote connection was not made because the attempted VPN tunnels failed. The VPN server might be unreachable. If this connection is attempting to use an L2TP/IPsec tunnel, the security parameters required for IPsec negotiation might not be configured properly
Error
I have also opened ports 1723,1701,500,47,4500 in Azure portal for both inbound and outbound on the Azure Portal (screenshot
here)
I have also tried the steps described in this post:
Make a VPN Connection from Azure VM
But does not do what I want. I have the VPN's public IP and username/password, and nowhere does the above mention how to set this up.
Do I need any additional settings or open any other ports in order for this to work?
From your comment, it seems that you want to connect Azure VM to a server on your on-premise network with your local VPN device.
In this case, you could set up a site-to-site VPN connection to connect the Azure VNet and on-premise network following this tutorial: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal
After that, you can directly connect to your Azure VM with its private IP address from your on-premise server. In fact, you don't need to connect from Azure Windows VM (Windows Server 2012) to VPN using a built-in VPN client because once the VPN is connected, the traffic from the on-premise network to the Azure network goes through the VPN tunnel and vice versa. We don't need to connect from Azure VM just from on-premise resources.
My VNet won't allow me to connect to the s2s location via p2s connection.
I'm trying to connect the Azure VPN client on my machine and reach a site that is allowed in a network which I have a s2s connection to.
Here's the thing, I can't get traffic to flow from my pc running the VPN client, out to the target site.
Topology
PC > VPN Client > VNet via p2s > Remote network via s2s > FTP server
I'd like to be able to ping the FTP server from my machine.
Currently only devices in the VNet can ping.
I tried setting up BGP but it broke the connection, as I don't really know how things should be set.
I don't have access to the remote site or it's devices.
I have a Azure local network gateway which is configured as the s2s location.
I'm sorry if that doesn't make sense.
Edit: here is the picture of the network
BGP is the standard routing protocol which enables the Azure VPN Gateways and your on-premise VPN devices to exchange "routes" that will inform both gateways on the availability and reachability for those prefixes to go through the gateways or routers involved.
To configure the BGP, your on-premise device should also support BGP. Read
What address does Azure VPN gateway use for BGP Peer IP?
What are the requirements for the BGP Peer IP addresses on my VPN device?
What should I specify as my address prefixes for the Local Network Gateway when I use BGP?
Without BGP, If you add the point-to-site addresses after you create your site-to-site VPN connection, you need to update the routes manually. You need to manually add the routes to the remote network on your machine.
For more information, you could refer to configure and validate virtual network or VPN connections. Except the Ping tool, you prefer to use TCping tool, see the detailed steps.
Generally, you could troubleshoot the issue by searching the common issue and solution in the virtual network gateway---Diagnose and solve problems on Azure portal. It's recommended to new a support ticket to get your issue resolved quickly.
My solution to this as I can't enable BPG is to use a proxy server within the VNet.
I have created an Azure virtual network with point-to-site connectivity enabled.
The point-to-site address space is 10.0.0.0/24 (10.0.0.1 - 10.0.0.25).
The virtual network address space is 10.0.1.0/24 (10.0.1.4 - 10.0.1.254).
I added an Azure VM, and it is assigned an IP of 10.0.1.4.
I created the client VPN package and installed it on a machine. It creates a PPP adapter with an IP address 10.0.0.1.
As a result I can't ping / connect to from the client 10.0.0.1 to the VM 10.0.1.4.
How should this work? Do I need some other routing or should I have somehow ended up with the client and VM in the same subnet?
Should I have set up DNS?
It is simple - Windows VMs have default Firewall enabled (as do all default WIndows Server Installations). And this Windows Firewall blocks ICMP packets (which are the PING) packets.
You can easily test the connectivity to the VM by simply trying remote desktop to the targeted VM. Or disable the Windows Firewall.