L2TP/IPsec Explained: Legacy VPN Technology
L2TP/IPsec is an older VPN pairing built into many devices. Learn how its two layers work, where it struggles, how to troubleshoot it, and when a newer protocol is the better pick.
10 min readUpdated Oct 15, 2026By XPASS Editorial Team

If you open the VPN settings on an older laptop, phone or router, you will probably see "L2TP/IPsec" somewhere in the list. It looks serious, it is usually described as secure, and it is available without installing anything extra. So is it still a reasonable choice? The honest answer is that it is a perfectly understandable technology with real limits, and for most new setups there are better options.
This article explains L2TP/IPsec as its own topic: what the two names stand for, how a connection is built step by step, what the ports and keys are about, where it tends to fail, and how to decide whether to keep it. For a general introduction to what a protocol is, start with our guide to VPN protocols.
Two technologies stuck together
The name tells you the story. There are two layers, and each does a different job.
- L2TP stands for Layer 2 Tunneling Protocol. It creates a tunnel that carries your network traffic from one end to the other. It was designed in the late 1990s by combining ideas from two earlier tunneling approaches. On its own it has no encryption and no real authentication of the tunnel itself. It simply wraps data.
- IPsec is a family of standards for authenticating and encrypting IP packets. It does the security work that L2TP does not. Its architecture is described in RFC 4301, and a practical overview for administrators is NIST's guide to IPsec VPNs.
When people say "L2TP VPN" they nearly always mean the pair, L2TP running inside an IPsec protected channel. Using L2TP alone would send traffic in a form that anyone along the path could read, so a connection labelled only "L2TP" without IPsec should be treated with suspicion.
Think of a sealed courier van (IPsec) that carries a parcel truck (L2TP). The van gives the secrecy; the truck gives the organised delivery route. Because you are packing a vehicle inside a vehicle, there is more overhead than in a single, purpose-built design.

How a connection is built, step by step
Understanding the order of events makes troubleshooting much easier.
- IKE negotiation. The client and server first set up the IPsec layer using IKE (Internet Key Exchange). This uses UDP port 500. They agree on ciphers and prove who they are, using either a pre-shared key or certificates.
- NAT traversal. If the client sits behind a home router doing address translation, the traffic switches to UDP port 4500, wrapping the IPsec packets so they survive translation.
- IPsec channel established. Keys are derived and an encrypted channel (using ESP, the Encapsulating Security Payload) is ready.
- L2TP tunnel. Inside the channel, L2TP uses UDP port 1701 to build the tunnel between client and server.
- PPP login. Inside the L2TP tunnel, a PPP session starts and the user is asked for a username and password, or another credential.
- IP address and routes. The server gives the client an address and the routes to use. Traffic starts to flow.
Notice that there are two separate authentications. IPsec first proves the devices to each other with a key or certificate, then PPP proves the person with a username and password. That separation is useful in company networks, where one shared key identifies the organisation and individual accounts identify staff.
Authentication choices: pre-shared key or certificate
The IPsec layer needs a way to start trusting the other side, and there are two main ways.
Pre-shared key (PSK)
A single secret string is typed into both client and server. It is quick to set up, which is why home routers and small-office tutorials love it. The weakness is human, not mathematical:
- The same key is shared by everyone, so one leak affects everyone.
- Many setups use short or guessable values, or leave the example value from a guide.
- If an attacker learns the key, they may be able to stand up a fake server that clients accept, then ask users for their passwords.
If you must use a PSK, make it long and random, store it in a password manager, give it only to the people who need it, and change it when someone leaves.
Certificates
With certificates, the server (and optionally each client) proves its identity with a signed file instead of a shared secret. That is stronger and scales better, but it needs someone to create, distribute and renew them. Why the cipher side matters is covered in our encryption explainer, and the IKEv2 specification, RFC 7296, shows how modern IPsec negotiates both sides.
What L2TP/IPsec does well
Fairness matters. The pairing earned its popularity.
- Built-in support. Many operating systems and routers can connect with no extra software, which is handy in managed offices and for recovery situations.
- A mature security foundation. IPsec has been studied for decades and, with modern settings, is a respected building block.
- Familiar to administrators. Plenty of network engineers know how to run, log and troubleshoot it.
- Works with PPP accounts. It plugs into existing user databases in some environments.
These advantages explain why it remains in so many menus. They are mostly advantages of convenience and compatibility, not of design.
Where L2TP/IPsec struggles
Double encapsulation costs speed
Every packet is wrapped twice, first by L2TP and then by IPsec. Extra headers eat into the maximum packet size. If the settings are not adjusted, large packets get fragmented, which slows connections or makes some sites stall. The idea of path MTU, the largest packet that can cross a route without being split, is the reason you sometimes see pages that half load.
Fixed ports that are easy to recognise
UDP 500, 4500 and 1701 are well known. Networks that restrict traffic, such as some hotels, airports, schools or mobile carriers, often block or mishandle them. That produces timeouts that look like a broken server but are really a network policy.
NAT and firewall problems
IPsec was designed before home routers doing address translation were everywhere. NAT traversal fixes much of that, but not all of it. A server that sits behind its own NAT, or clients behind two layers of NAT, can fail in confusing ways. On Windows this often shows up as an error code, which we cover in the help guide on common Windows VPN errors.
Configuration complexity
There are many places to make an old or mismatched choice: encryption algorithms, key lengths, lifetimes, Diffie-Hellman groups and PPP options. A single mismatch between the two ends causes failure, with error messages that rarely say which one.
Older defaults
Many devices still ship defaults picked a decade or more ago. Weak algorithm choices can remain enabled for compatibility. This is a configuration risk, not an inherent flaw in IPsec, but it is a common one.
Troubleshooting a failing L2TP/IPsec connection
Work from the simplest cause to the most complex. These steps assume you have the right credentials and server address from your administrator.
- Check the basics. Confirm the internet itself works, the server name is typed exactly, and the username and password are correct.
- Check the clock. If certificates are in use, a wrong date makes them invalid.
- Test on another network. Try mobile data or a different Wi-Fi. If it works elsewhere, the first network is blocking the ports.
- Check the PSK. A single wrong character looks like a generic failure. Retype it rather than pasting from a document that may have added spaces.
- Look at NAT. If the server is behind a router, make sure it forwards or allows UDP 500 and 4500 and that IPsec passthrough features are not interfering.
- Read the error code. Windows error 809 usually indicates the first packets did not get through, often a NAT or firewall matter. Error 789 points to a security-layer mismatch. Error 691 is typically a rejected username or password. The help guide linked above lists the usual fixes for each.
- Compare settings on both ends. Look for differences in encryption and authentication proposals, and reduce the options to one known-good set.
- Try another protocol. If the server also offers IKEv2, WireGuard or OpenVPN, switching often removes the problem altogether.
If a general VPN app refuses to connect and you are not sure why, the step-by-step guide on VPN not connecting covers the broader checklist. Keep the app's default connection method unless support suggests otherwise.

Should you still use it? A practical decision guide
The right answer depends on your situation. Here is a quick way to think through common cases.
| Situation | Suggested approach |
|---|---|
| Starting a new personal or small-business setup | Choose a modern option such as WireGuard, OpenVPN or IKEv2/IPsec |
| Old router or NAS that only offers L2TP/IPsec | Use it with a long private key and strong passwords while planning an upgrade |
| Office system already using it with certificates | Keep it running, review ciphers, and schedule a migration |
| Traveller on restrictive networks | Expect problems; other protocols often cope better |
| Device with no VPN client for newer protocols | Use the built-in option, but limit what you send over it |
The comparison with newer designs is covered in WireGuard vs OpenVPN. In short, WireGuard and OpenVPN are simpler to reason about and less tied to fixed ports, while IKEv2 keeps the proven IPsec foundation with a more modern negotiation and better handling of network changes.
If you have to keep it: a hardening checklist
If a legacy device leaves you no choice, reduce the risk with these steps.
- Use certificates if the platform supports them. Otherwise use a PSK of at least 20 random characters.
- Disable weak encryption and hash options so only modern ones are offered.
- Give every user their own PPP account, never a shared login, and use long unique passwords.
- Keep router and server firmware up to date, and replace gear that no longer receives updates.
- Restrict who can reach the VPN ports where your firewall allows it.
- Log connections on the server and review failed attempts.
- Set a review date to decide whether to migrate.
- Document the settings so the next person does not need to guess.
Common misunderstandings
"L2TP means encrypted." No. L2TP alone is not encrypted. The protection comes from IPsec.
"Built in means best." Built in means convenient. Whether a protocol is the right pick depends on its security, speed and compatibility for your situation.
"The PSK is a password, so it does not matter." It matters a great deal, because everybody shares it and it can open the way to impersonation of the server.
"If it connects, it is secure." A working connection can still use weak algorithms. Connection success tells you nothing about cipher strength.
"It is as bad as PPTP." It is not. The IPsec layer, when configured well, is still respected. The concern is age, complexity and fixed ports, not a broken core.
Summary
L2TP/IPsec pairs a tunneling layer with an encryption layer. IKE on UDP 500, NAT traversal on UDP 4500 and L2TP on UDP 1701 build the connection in steps, with a pre-shared key or certificates proving the devices and a PPP login proving the person. It is widely built in and rests on mature IPsec, but double wrapping, fixed ports, NAT sensitivity and easy misconfiguration make it a legacy choice. For new setups, a current protocol is usually better; for existing ones, harden it and plan the move.
If you would rather use a ready-made app than tune protocol settings, you can compare the passes on the pricing page.
Frequently asked questions
What does L2TP/IPsec actually mean?
L2TP builds the tunnel and carries your traffic, but it has no encryption of its own. IPsec is added underneath to encrypt and authenticate that tunnel. The two together are written L2TP/IPsec.
Is L2TP/IPsec secure?
With strong settings, such as modern ciphers and certificates or a long, private pre-shared key, the IPsec layer is not broken in the way older PPTP is. But the pairing is old, heavy and easy to misconfigure, and newer protocols are usually a better choice.
Why does L2TP/IPsec fail behind some routers?
It relies on specific UDP ports and on IPsec traffic passing through address translation. Some routers, hotel networks and mobile carriers handle that badly, which produces timeouts or errors such as Windows 809.
What is a pre-shared key and why is it a weakness?
It is a single shared secret that every user types in to set up the IPsec layer. If it is short, reused or published in a tutorial, anyone who knows it may be able to impersonate the server, so it should be long and kept private.
Should I choose L2TP/IPsec for a new setup?
Usually not. Choose it only when a device or office system offers nothing newer. If you have a choice, IKEv2/IPsec, WireGuard or OpenVPN are better starting points.
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

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

VPN Security
WireGuard vs OpenVPN Explained
WireGuard and OpenVPN both build encrypted tunnels, but they differ in design, complexity and flexibility. Here is a plain comparison and how to think about the choice.
9 min read

VPN Security
What Is VPN Encryption?
VPN encryption scrambles your data between your device and the VPN server. Here is how keys, ciphers and the handshake work, and what encryption cannot do.
10 min read

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