Troubleshooting Azure VPN Gateway Connections

This document provides guidance on how to use Azure Network Watcher to troubleshoot common issues with Azure VPN Gateway connections.

Tip: Ensure you have the appropriate permissions in your Azure subscription to access Network Watcher and VPN Gateway resources.

Common Gateway Connection Issues

Several factors can lead to VPN gateway connection problems, including:

Using Network Watcher Tools

Network Watcher offers a suite of tools to diagnose and troubleshoot network issues. For VPN gateway connections, the most relevant tools include:

1. IP Flow Verify

IP Flow Verify helps determine if traffic is allowed or denied to a virtual machine or gateway based on Network Security Group (NSG) rules. This is crucial for checking if firewall rules are inadvertently blocking VPN traffic.

Steps:

  1. Navigate to your virtual machine or gateway resource.
  2. Under the "Monitoring + diagnostics" section, select "IP Flow Verify".
  3. Specify the direction (Inbound/Outbound), protocol (TCP/UDP), local IP address, local port, remote IP address, and remote port.
  4. Click "Check". The tool will report whether the traffic is allowed or denied and which NSG rule is responsible.

2. Next Hop

The Next Hop tool helps you understand how traffic is routed from a virtual machine or gateway to a destination IP address. This is useful for diagnosing routing problems.

Steps:

  1. Navigate to your virtual machine or gateway resource.
  2. Under the "Monitoring + diagnostics" section, select "Next Hop".
  3. Enter the destination IP address.
  4. Click "Check". The tool will indicate the next hop type (e.g., VirtualAppliance, VNetGateway, Internet) and the associated IP address and route table.

3. Connection Troubleshoot

This tool allows you to perform end-to-end connectivity checks between two endpoints. You can use it to test connectivity from a virtual machine to your on-premises VPN device or vice-versa.

Steps:

  1. Navigate to your virtual machine or gateway resource.
  2. Under the "Monitoring + diagnostics" section, select "Connection Troubleshoot".
  3. Specify the source and destination IP addresses, ports, and protocol.
  4. Click "Check". The tool will provide details about the connection status, latency, and any detected issues.

4. VPN Troubleshoot (for specific VPN Gateway scenarios)

While not a direct Network Watcher tool in the same vein as the above, the Azure portal for VPN Gateways provides dedicated troubleshooting options that leverage similar underlying diagnostic capabilities. This can include checking the status of tunnels, BGP peering, and gateway health.

Steps:

  1. Navigate to your VPN Gateway resource in the Azure portal.
  2. In the left-hand menu, under "Troubleshooting + support", select "VPN troubleshoot".
  3. Follow the guided workflow to diagnose specific issues like tunnel status or configuration mismatches.
Note: For site-to-site VPN connections, ensure that the shared keys match on both the Azure VPN Gateway and your on-premises VPN device.

Troubleshooting Steps Summary

Here's a recommended workflow for troubleshooting VPN gateway connection issues:

  1. Check Gateway Status: Ensure the VPN Gateway service in Azure is running and healthy.
  2. Verify NSG Rules: Use IP Flow Verify to confirm that NSG rules are not blocking necessary VPN traffic.
  3. Inspect Routing: Utilize the Next Hop tool to identify any routing misconfigurations.
  4. Test Connectivity: Employ Connection Troubleshoot to verify reachability between endpoints.
  5. Examine On-Premises Device: Review the configuration and logs of your on-premises VPN device for errors.
  6. Review VPN Gateway Logs: Look for specific error messages or warnings within the VPN Gateway diagnostics.

Advanced Troubleshooting

For more complex issues, consider enabling diagnostic settings for your VPN Gateway to collect detailed logs, metrics, and traces. These can be sent to Azure Storage, Log Analytics, or Event Hubs for in-depth analysis.

Important: Always consult the official Azure documentation for the latest information and specific configurations related to your VPN Gateway SKU and deployment model.