Windows VPN Error 789: How to Troubleshoot
Error 789 appears when the two ends cannot agree on security settings. See what is being negotiated, what commonly breaks it, and how to test one change at a time.
9 min readUpdated Oct 15, 2026By XPASS Editorial Team

Error 789 sounds like a vague warning about security, and in a way it is. Windows reports that the L2TP connection attempt failed because the security layer hit a processing error during initial negotiations with the remote computer. In plain words, the two ends started a protected conversation and could not finish setting up the rules for it.
This guide takes a different route from a general error list. It starts with what is actually being negotiated, because once you know the steps, you can see which one fails and why. After that it covers the common culprits in a sensible order: connection type, shared key, clock, Windows services, leftover software and the network path. For the overview of 809, 789 and 691 side by side, see common Windows VPN errors. This article stays on 789.
What the message means in plain language
Error 789 belongs mostly to L2TP connections that rely on IPsec for protection. Windows shows it when the IPsec part of the handshake breaks. It does not mean that the server is unreachable, which is the territory of error 809, and it does not mean your account was rejected, which is error 691. It is a middle-of-the-road failure: the two sides found each other, started talking and then could not agree.
Think of two people meeting to sign a contract in a sealed room. First they must confirm each other's identity, then agree on the language and the lock they will use. Error 789 is like a failure at that stage: the identity check failed, the agreed language did not match, or someone cut the line mid-sentence. Only after this stage does the username and password step happen, which is why a wrong password shows up later and differently.

Inside the negotiation: what Windows and the server settle first
You do not need to memorise the standards, but a rough map helps. The IPsec framework, described in RFC 4301, and the key exchange it relies on, described in RFC 7296, involve these stages:
- Both sides announce what they support, such as encryption methods and integrity checks, and pick a combination both know.
- They prove who they are. In the L2TP setups most consumers meet, this uses a pre-shared key, a secret string both sides must hold identically. In company setups it can use certificates instead.
- They derive session keys and set up the protected channel.
- Only then does the L2TP tunnel start, and later the username and password check.
Each stage has typical ways to fail.
| Stage | What it needs | Common failure | Result |
|---|---|---|---|
| Announce and agree | Matching supported methods | Wrong connection type selected | 789 |
| Prove identity | Identical shared key or valid certificate | Typo in the key; wrong or missing certificate; wrong clock invalidating a certificate | 789 |
| Derive keys | Both sides' traffic arrives | UDP traffic dropped midway by a router or firewall | 789 or 809 |
| Services | IPsec components running on Windows | A stopped or disabled service | 789 |
| Interference | No other software handling the same traffic | Old VPN driver or security software filter | 789 |
Notice that the clock and the network also feature. That is why this error rewards a methodical order of checks rather than one magic fix.
Step 1: confirm the connection type
The very first question is whether you picked the right VPN type. A mismatch here is one of the commonest reasons for 789, because a server that expects one type and receives another cannot continue the handshake.
- Open Settings > Network & internet > VPN.
- Select your connection and choose Advanced options > Edit.
- Compare the VPN type with what your account page lists. If the page names a method, select that one. If it names none, choose Automatic.
- Save and try again.
Do not pick a type just because an online forum recommends it. Your service decides what it supports, and a type it does not offer will fail in confusing ways. If you want more background on the idea of types, the article on VPN protocols is a short read.
Step 2: check the pre-shared key character by character
If your connection uses a pre-shared key, this is the second most likely cause. The key must match on both sides exactly, including capital letters, and Windows stores it without telling you if it is wrong. Typical mistakes:
- Look-alike characters. The capital letter O and the digit 0, the lowercase l, capital I and digit 1. Copy rather than retype.
- A hidden space. A key pasted from an email or chat app can pick up a space at either end.
- Smart punctuation. Some apps replace straight quotes or dashes with curly or longer versions, which are different characters.
- An old key. If a previous setup used a different key and you edited the entry instead of recreating it, an old value may remain.
A neat way to check what you copied is to paste it into Notepad first and read it carefully at a large font size, character by character. Then paste it into the Windows entry from the same source. Do not rely on memory or on a screenshot; copy it directly from your account page.
In the Windows VPN edit screen, the key goes into the field that appears when the type is L2TP/IPsec with pre-shared key. If that field is not shown, your selected type does not use one, which may itself be the mismatch. Only enter a key if your account page gives you one.
Step 3: fix the clock before anything fancy
The security layer cares about time more than most people expect. Certificates have start and end dates, and key exchanges include timestamps. A PC clock that has drifted, a wrong time zone, or a dead CMOS battery after a long period without power can quietly make the check fail.
- Go to Settings > Time & language > Date & time.
- Turn on Set time automatically and Set time zone automatically.
- Select Sync now under additional settings.
- Look at the result. It should match your phone to within a minute or so.
This takes one minute and costs nothing. If you recently travelled and manually changed the time zone, switch back to automatic, because a hand-set zone often leaves the clock hours off.
Step 4: make sure the Windows security services are running
The IPsec part depends on two background services. In a default installation they start themselves, but some tuning tools or security software disable them.
- Press the Windows key, type Services and open it.
- Find IKE and AuthIP IPsec Keying Modules. Its status should be Running, and its startup type should be Manual (Trigger Start) or Automatic.
- Find IPsec Policy Agent and check the same.
- If either has stopped, right-click it and choose Start. If its startup type is Disabled, change it to Manual or Automatic first, then start it.
- Restart the PC and test again.
If you manage a company PC, a policy may have disabled them deliberately. Do not change those services on a work laptop without asking IT.
Step 5: remove leftovers from older VPN software
Older VPN clients sometimes leave behind drivers and network filters that keep intercepting traffic even after the program seems to be gone. That is a well-known cause of 789 on PCs that have tried several VPN tools over the years.
- Open Settings > Apps > Installed apps and uninstall VPN programs you no longer use.
- Open Device Manager, choose View > Show hidden devices, and look under Network adapters for stale virtual adapters from tools you removed. Remove only those clearly belonging to old software, and leave the WAN Miniport entries that Windows manages.
- Restart.
Also consider security suites that include their own network filter. If pausing one briefly changes the result, add an allow entry for the VPN rather than leaving protection off.

Step 6: the network path and NAT
IPsec negotiations typically use UDP traffic on ports 500 and 4500. When one side sits behind address translation (NAT), IPsec packets are wrapped so that they can travel through it, a process known as NAT traversal. Some routers and some networks handle this badly or block it.
Quick tests that need no technical knowledge:
- Try your phone's hotspot. If the VPN connects there, your normal network is the problem. The general checklist in VPN not connecting uses the same idea of testing another path.
- Restart your router and, if you have two routers in a row, plug the PC into the first one to remove a layer of NAT.
- Check public networks. Hotel, school and office networks often filter anything beyond web traffic. If you are there, 789 may be a symptom of that filtering.
On a managed network, ask the administrator rather than trying to work around the setup. If the hotspot works and your home network does not, the router or provider is the focus, not Windows.
Keep a one-change-at-a-time log
Error 789 invites random fiddling, which makes it hard to know what helped. Use a small log like this one, in a notes app, and change only one thing per row.
| Attempt | What I changed | Network | Result |
|---|---|---|---|
| 1 | Set type to what the account page lists | Home Wi-Fi | Still 789 |
| 2 | Re-copied the shared key | Home Wi-Fi | Still 789 |
| 3 | Synced the clock | Home Wi-Fi | Still 789 |
| 4 | Started both IPsec services | Home Wi-Fi | Still 789 |
| 5 | Same settings | Phone hotspot | Connected |
In this made-up example, row 5 tells you the PC and the settings are fine and that the home network or router is the issue, which saves hours of editing the wrong thing. A log is also exactly what support wants to read.
When a different method is the answer, and what to tell support
If every check above passes and the error repeats on the same network, the network may simply not carry that type of traffic well. If your account page lists another supported method, you can try it. Use only methods that your account page lists, do not invent a setting, and keep the app's default unless support advises a change. The free VPNclient app on the download page is another route to the same pass, and it displays its own messages instead of numbered codes.
If it still fails, email xpassvpn@gmail.com with the error number, your Windows version, the type you selected, which networks you tested with results, and the email used at checkout. Never send your password or shared key in plain text. Support can see the order without them, and if you are unsure where your details live, read where to find your login details.
Summary
Error 789 is a security handshake failure, not a login failure. Work in this order: confirm the connection type, re-copy any shared key, sync the clock, check the two IPsec services, remove leftover VPN software and then test another network. Change one thing at a time and keep notes. If nothing works across networks, contact support with your log; if your pass needs renewing first, the options are on the pricing page.
Frequently asked questions
What does Windows VPN error 789 mean?
Error 789 means the L2TP connection attempt failed because the security layer hit a processing error during the first negotiation with the remote computer. The two sides could not agree on or verify their security settings.
Is error 789 a password problem?
Usually not. A rejected username or password produces a different error. Error 789 happens earlier, while the two ends are setting up the protected tunnel, so a wrong shared key, wrong connection type or wrong clock is a likelier cause.
Which Windows services matter for error 789?
The IKE and AuthIP IPsec Keying Modules service and the IPsec Policy Agent service take part in the negotiation. If either has stopped or is disabled, the security layer cannot start. Both normally run on their own in a default Windows setup.
Can an old VPN program cause error 789?
Yes. Leftover drivers or filters from a previous VPN client can interfere with the Windows security layer. Uninstalling the old program and restarting often clears it.
When should I try a different connection type?
When every check passes on the same network and the error repeats, and your pass lists another supported method. Only use connection types that your account page lists, and keep the app default unless support suggests otherwise.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a VPN for a short trip or a busy month?
XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.
See passesKeep reading

Troubleshooting
How to Fix Common Windows VPN Errors (809, 789, 691)
A step-by-step guide to the most common Windows VPN error codes: what they mean, the usual cause of each and the safest fix to try first.
7 min read

Troubleshooting
VPN Not Connecting? Step-by-Step Fixes
A clear order of checks for when the VPN will not connect: pass status, login details, Wi-Fi and mobile data, permissions, firewalls, app conflicts and error messages.
8 min read

VPN Basics
What Is a VPN Protocol?
A VPN protocol sets the rules for how your device and a VPN server connect and protect traffic. Here is what that means in plain language, with the main trade-offs.
9 min read

Device Guides
How to Set Up a VPN on Windows
Step by step: download VPNclient for Windows, install it, answer the Windows security prompts, sign in with your My Pass details and connect.
7 min read

Device Guides
Where Are My VPN Login Details?
Your username and password appear only in My Pass after you sign in. Here is how to open the page, copy the details, fix a sign-in loop and what to do if they are missing.
7 min read