Error While Connecting to Azure VPN: "Custom Script (to update your routing table) failed (80070002)"

Ketan Patel 0 Reputation points
2025-01-23T12:11:08.3066667+00:00

Hello,

I am encountering an issue while connecting to an Azure VPN.

User's image

After initiating the connection, I get the following error message:

Hello,

I am encountering an issue while connecting to an Azure VPN. After initiating the connection, I get the following error message:

Custom script (to update your routing table) failed (80070002).

Steps I’ve Taken So Far:

  • Verified that the Azure VPN Client is installed correctly.
  • Reinstalled the Azure VPN Client to ensure there are no missing files.
  • Checked my VPN configuration settings to confirm the routing table is set up as expected.
  • Confirmed I have the necessary certificates installed for the VPN.
  • Looked into the Event Viewer logs, but I wasn’t able to pinpoint the exact cause.

My Environment:

  • Operating System: Windows 11 Home, 24H2
  • Azure VPN Dialler Version : 7.2.26100.1
  • Connection Name : vnet-hub-prod-uksouth-001
  • All Users/Single User : Single User

What I Need Help With:

  • What could be causing the 80070002 error related to the custom script?
  • Are there any specific files or dependencies I should check for this script?
  • How do I debug and resolve issues with updating the routing table?

I’d appreciate any guidance or troubleshooting steps. Let me know if you need additional details about my setup.

Thank you!

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,622 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 18,961 Reputation points MVP
    2025-01-23T12:56:15.7266667+00:00

    Hi Ketan Patel

    I have experienced the similar issue before, and the steps below helped to resolve the issue. Please check, if it helps you too

    Reinstall WAN Miniport (IP) interface drivers in the following way:

    1. Open Device Manager.
    2. Right-click all the network adapters whose name starts as "WAN Miniport," and then select Uninstall device. Here are some adapters that you may observe:
      • WAN Miniport (IP)
      • WAN Miniport (IPv6)
      • WAN Miniport (GRE)
      • WAN Miniport (L2TP)
      • WAN Miniport (Network Monitor)
      • WAN Miniport (PPPOE)
      • WAN Miniport (PPTP)
      • WAN Miniport (SSTP)
    3. On the Device Manager menu bar, select Action > Scan for hardware changes. This will automatically reinstall your WAN Miniport devices.
    4. Try connecting Azure VPN again

    Hope this helps.


    --please don't forget to upvote and Accept as answer if the reply is helpful--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.