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,643 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Manu Philip 19,426 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--

    0 comments No comments

  2. Rohith Vinnakota 2,690 Reputation points Microsoft Vendor
    2025-01-30T09:24:46.0033333+00:00

    Hi @Ketan Patel,

    Greetings,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.

    Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.

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

     

    Resolution: I finally found out that my antivirus, Norton, was causing the issue. I have uninstalled it, and now everything works fine

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


  3. EJR 26 Reputation points
    2025-02-11T17:35:16.2+00:00

    We've been troubleshooting this issue all day and have tried all the suggestions here and have just discovered the most bizarre solution. If the PC (Laptop) is not connected to the power supply (i.e. battery only) and it's in power saving mode, the connection fails with "Custom script (to update your routing table) failed (80070002).". As soon as we connect the charger OR disable power saving mode, it connects fine - it's very consistent.

    0 comments No comments

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.