Fix VPN Error: Cannot Establish Connection, Change Network Settings | Ranjan.info

I faced a strange problem in Windows 10 when all VPN connections suddenly stopped working with the following error message:

Can’t connect to VPN
A connection to the remote computer could not be established. You might need to change the network settings for this connection.

Cannot connect to VPN - Error 720 The connection to the remote computer could not be established.  This connection may require you to change network settings.

I use a built-in Windows VPN client to connect. On the neighboring device, the VPN connection with the same settings works fine, so the problem is not with the remote VPN host.

There is a VPN error 720 in the Application log of Event Viewer:

EventID: 20227
Source: RasClient
The user dialed a connection named VPN which has failed. The error code returned on failure is 720.

The basic recommendation in such a case is to reset the TCP/IP stack settings and network adapter settings on your computer with the following command:

netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns

The connection may be blocked by Windows Firewall rules or a third-party antivirus/firewall (try disabling them for a while).

Make sure that Windows does not use a WinHTTP proxy to access the Internet.

netsh winhttp show proxy

Check WinHTTP Proxy Direct Access

Current WinHTTP proxy settings:
Direct access (no proxy server).

In this example, a direct connection is used.

If you want to reset proxy settings, run the command below:

netsh winhttp reset proxy

In my case, I was unable to connect to the VPN after doing this.

then try to reinstall van miniports Virtual Adapter in Device Manager.

van miniports There are virtual network adapters with drivers for various connection protocols. Windows has WAN miniport adapters for IKEv2, IP, IPv6, L2TP, Network Monitor, PPPOE, PPTP and SSTP.

  1. Open Device Manager (devmgmt.msc), expand the Network Adapters section, and select Uninstall All Devices with the name van miniport,
  2. For example, choose Van Miniport (SSTP)Right-click it, and select uninstall device in the context menu;
  3. Go to the next WAN miniport device. You need to remove all devices:
    • Van Miniport (PPTP)
    • Van Miniport (PPPoE)
    • WAN Miniport (Network Monitor)
    • WAN Miniport (L2TP)
    • WAN Miniport (IPv6)
    • WAN Miniport (IP)
    • Van Miniport (IKEv2)
  4. Then re-scan your hardware configuration (Action -> Scan for Hardware Changes), and wait until Windows detects and installs the drivers for the WAN miniport device; Scan for Hardware Changes with Device Manager
  5. After reinstalling all WAN miniports, check your VPN connection. it should work.

You can use PowerShell to diagnose any WAN miniports issues.

Make sure all protocols are enabled for the network adapter (Enabled=True), and there are no third-party drivers in your filtering drivers (they may be added by your antivirus software).

$adapter=Get-NetAdapter -IncludeHidden | Where-Object {$_.InterfaceDescription -eq "WAN Miniport (PPTP)"}
Get-NetAdapterBinding -Name $adapter.name -IncludeHidden –AllBindings

Manage Network Filtering Drivers With PowerShell

You can enable/disable the filtering driver with the command:

Enable-NetAdapterBinding -Name $adapter.name -IncludeHidden -AllBindings -ComponentID ms_wanarp

Leave a Comment