Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
Windows Server

Remote Access Connection Manager (RasMan): fix and manage it

What the RasMan service does, why built-in VPNs fail without it, and how to fix errors 1058 and 1068, broken WAN Miniports and VPN codes 809, 720 and 691.

CloudSat teamNovember 18, 20266 min read
Abstract illustration of a switchboard of glowing sockets on a dark panel, with one cable of light plugged in and leading out toward a distant network
On this pageWhat RasMan does, and what it does not

Remote Access Connection Manager, service name RasMan, is the Windows service behind dial-up and built-in VPN connections. When it is stopped or broken, the VPN client in Windows fails with messages that rarely mention it. It is also widely confused with Remote Desktop, which it has nothing to do with. This guide explains what depends on RasMan, how to get it running, and what to check when the service is fine but the VPN still fails.

What RasMan does, and what it does not

RasMan sets up and tracks connections made through Windows' remote access stack:

  • the built-in VPN client, for IKEv2, SSTP, L2TP/IPsec and PPTP connections;
  • Always On VPN profiles and other connections pushed by device management;
  • VPN apps that plug into Windows' own VPN platform rather than bringing their own driver;
  • the Routing and Remote Access role, when a Windows Server acts as a VPN server or router;
  • old-style dial-up and mobile broadband connections.

It plays no part in Remote Desktop, which runs on the Remote Desktop Services service, TermService. VPN apps with their own network driver, such as the WireGuard and OpenVPN clients, do not use it either. If your problem is an RDP session, RasMan is not the cause; see our guide to the "An internal error has occurred" message instead.

Check the service

PowerShell shows the state and both directions of the dependency chain, which is more reliable than memorizing which services belong together on which Windows version:

Get-Service RasMan | Select-Object Name, DisplayName, Status, StartType
Get-Service RasMan -RequiredServices      # services RasMan needs
Get-Service RasMan -DependentServices     # services that need RasMan
sc.exe qc RasMan                          # startup type, account and dependencies in one view

On a typical system, the dependent list includes Remote Access Auto Connection Manager, and on servers with the role installed, Routing and Remote Access.

Start it and set a sensible startup type

From PowerShell run as administrator:

Set-Service -Name RasMan -StartupType Manual
Start-Service -Name RasMan

Manual lets Windows start the service when a connection needs it. Choose Automatic when a VPN must connect at boot, for example an Always On VPN device tunnel. Disabled is what usually causes the problems in the first place, often set by a "debloat" script or an aggressive hardening guide.

Fix errors when it will not start

Error Meaning What to do
1058: the service cannot be started RasMan, or a service it needs, is disabled Set RasMan to Manual, then check each required service's startup type
1068: the dependency service or group failed to start A required service failed first Start each service from -RequiredServices and fix the one that fails
Starts, then stops again The service crashes Read the event log, then repair system files

The System log records why. Service Control Manager writes event 7000 when a service fails to start, 7001 when a dependency failed, 7023 when a service ended with an error, and 7031 or 7034 when it stopped unexpectedly:

Get-WinEvent -FilterHashtable @{LogName = 'System'; ProviderName = 'Service Control Manager'; StartTime = (Get-Date).AddDays(-2)} |
  Where-Object Message -match 'Remote Access|Telephony|Secure Socket' |
  Format-Table TimeCreated, Id, Message -Wrap

If RasMan crashes repeatedly, install pending Windows updates first, then repair the component store and system files. Both commands take a while and need an administrator prompt:

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Old VPN clients that were removed badly are another common cause. Uninstall VPN software you no longer use, restart, and try again.

When RasMan runs but the VPN still fails

Windows logs each failed attempt in the Application log under the source RasClient, with the error code in the message, usually as event 20227:

Get-WinEvent -FilterHashtable @{LogName = 'Application'; ProviderName = 'RasClient'} -MaxEvents 10 |
  Format-Table TimeCreated, Id, Message -Wrap

The codes you will see most often:

Code Usual meaning Where to look
691 The user name, password or sign-in method was rejected Credentials, and the authentication method set on both sides
720 No PPP control protocols could be configured Broken WAN Miniport adapters on the client
789 L2TP security negotiation failed The pre-shared key or certificate
809 The VPN server did not answer Firewalls blocking UDP 500 and 4500, or an L2TP server behind NAT
812 A policy on the VPN server refused the connection The server's network policy, which only its administrator can change

Reinstall the WAN Miniport adapters

Error 720 and several odd failures come from damaged virtual adapters that the VPN stack uses. Open Device Manager, choose View > Show hidden devices, expand Network adapters, and uninstall each WAN Miniport entry. Then choose Action > Scan for hardware changes, or restart, and Windows recreates them.

L2TP when the server sits behind NAT

By default, Windows will not negotiate L2TP/IPsec with a server that sits behind a NAT device, which shows up as error 809. Microsoft documents a registry value that allows it:

New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\PolicyAgent' `
  -Name AssumeUDPEncapsulationContextOnSendRule -Value 2 -PropertyType DWord -Force
Restart-Computer

Use it only when you know the server is behind NAT. Better still, move to IKEv2 or SSTP, which handle NAT without changes.

Turn on tracing for stubborn cases

The remote access stack can write detailed logs:

netsh ras set tracing * enabled
rem reproduce the failure, then:
netsh ras set tracing * disabled

The logs land in %windir%\tracing. Turn tracing off afterwards; it keeps writing until you do.

A VPN on a cloud Windows server

People often add a VPN client to a cloud server to reach an office network. Be careful with full-tunnel VPNs: once connected, the server may send all traffic, including the replies to your own RDP session, into the tunnel, and your session freezes. Turn on split tunneling so only office traffic uses the VPN:

Set-VpnConnection -Name 'Office' -SplitTunneling $true

Test from a second session or with the console open. If a VPN on a CloudSat server does cut you off, Console access (VNC) in the server's Access tab still reaches the desktop, so you can disconnect it there (recovery tools).

Should you disable RasMan?

Only on machines where you are certain nothing uses the built-in VPN, dial-up or Routing and Remote Access, and only after checking -DependentServices. A stopped service on Manual already costs nothing, so disabling it saves little and tends to surprise the next person who needs a VPN.

FAQ

Does Remote Desktop need RasMan?

No. Remote Desktop runs on the Remote Desktop Services service. RasMan only matters for VPN and dial-up connections made through Windows itself.

Can I restart RasMan without rebooting?

Yes, with Restart-Service RasMan -Force. Any VPN connection that is up will drop, and dependent services restart with it.

Why does the VPN work for one user and not another?

Connections can be saved for one user or for all users, and certificates for some VPN types live in the user's own store. Check where the connection and its certificate were created.

Is it safe to set RasMan to Automatic?

Yes. The service uses very little when idle. Automatic is the right choice when a VPN has to connect before anyone signs in.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.