On this pageThe three families at a glance
"IPsec vs SSL" compares two families of VPN. IPsec encrypts traffic at the network layer and is the standard language of firewalls and routers. SSL VPNs, which today run on TLS, wrap traffic in the same protocol that protects HTTPS. A third option has become the default for many new setups: WireGuard, part of the Linux kernel from 2020 on. This guide explains how the three differ in practice and which one fits site-to-site links, remote access and self-hosted networks.
The three families at a glance
| IPsec (IKEv2) | TLS-based VPN | WireGuard | |
|---|---|---|---|
| Examples | strongSwan, Libreswan, firewall and router vendors | OpenVPN, SSTP, OpenConnect | WireGuard on its own or under a management tool |
| Transport | IKE on UDP 500, data in ESP or UDP 4500 | TCP or UDP, often port 443 | UDP, one port you choose |
| Who authenticates | Certificates, pre-shared keys, or EAP with a user database | Certificates plus user logins, often with MFA | A public key per device |
| Built into the OS | Windows, macOS, iOS and Android include IKEv2 clients | SSTP on Windows; others need an app | An app on most systems; in the kernel on Linux |
| Strongest at | Talking to any vendor's firewall | Passing restrictive networks, user management | Simplicity and Linux-to-Linux links |
IPsec: the interoperable standard
An IPsec connection has two parts. IKEv2 runs first, on UDP port 500, to authenticate both ends and agree on keys. The data then travels in ESP, a separate IP protocol (number 50). When a NAT router sits in the path, both ends detect it and move everything into UDP port 4500, so the tunnel survives home routers and mobile networks.
Its strength is that everyone speaks it. A VPS running strongSwan can build a site-to-site tunnel with almost any office firewall, and phones and laptops connect with the IKEv2 client the operating system already includes. Its weakness is configuration: both ends must agree on encryption proposals, identities and traffic selectors, and a single mismatch produces an unhelpful "no proposal chosen". Guest and hotel networks that block UDP 500 and 4500 stop it entirely.
TLS VPNs: through almost any firewall
A TLS VPN builds its tunnel on the protocol that protects HTTPS, usually on port 443. Since almost every network lets HTTPS out, it connects from places where IPsec and WireGuard cannot. OpenVPN, the most common open-source option, prefers UDP and can fall back to TCP 443; SSTP, built into Windows, always uses TCP 443; OpenConnect and its server, ocserv, combine TLS with DTLS for speed.
The family also covers "clientless" SSL VPNs: a web portal that gives browser access to internal web apps without any tunnel software. Many commercial gateways offer both modes and tie logins to a directory with MFA, which is why the TLS family dominates large remote-access deployments.
Two caveats. Tunneling over TCP behaves badly on lossy links: when the outer connection retransmits, the inner TCP connections slow down too, and throughput collapses. Use UDP whenever the network allows. And internet-facing VPN gateways of every type, SSL VPN appliances in particular, have been the entry point of many serious breaches in recent years. How quickly you patch the gateway matters more than which protocol it speaks.
WireGuard: small and opinionated
WireGuard removes the choices. It uses one fixed set of modern algorithms (Curve25519, ChaCha20-Poly1305 and BLAKE2s), so there is nothing to negotiate or misconfigure. Each device has a key pair, and each peer entry says which addresses may come from that key:
# /etc/wireguard/wg0.conf on the hub
[Interface]
Address = 10.8.0.1/24
ListenPort = 51820
PrivateKey = <hub-private-key>
[Peer]
# laptop
PublicKey = <laptop-public-key>
AllowedIPs = 10.8.0.2/32
wg genkey | tee hub.key | wg pubkey > hub.pub
sudo wg-quick up wg0
sudo wg show
It runs only over UDP and does not answer packets that fail authentication, so a port scan cannot even tell it is there. Clients roam between Wi-Fi and mobile data without reconnecting. It has been part of the Linux kernel since version 5.6, and apps exist for Windows, macOS, iOS and Android.
What it leaves out is user management. There is no login, no MFA, no address pool and no certificate revocation; removing a person means removing their key. Management layers such as Headscale, NetBird or Firezone add identity, access rules and key distribution on top of WireGuard when a team outgrows hand-edited files.
The differences that decide
| Situation | Best fit | Why |
|---|---|---|
| Your VPS and an office firewall | IPsec IKEv2 | Every firewall vendor supports it |
| Linux servers you control | WireGuard | A few lines of config per peer, kernel speed |
| A few admins reaching private services | WireGuard | One key per laptop, nothing exposed but one UDP port |
| Many users with SSO, MFA and audit logs | A TLS VPN gateway, or WireGuard with a management layer | User directory and policy built in |
| Users on networks that block UDP | OpenVPN over TCP 443, or SSTP | Looks like ordinary HTTPS traffic |
| No software install allowed on clients | IKEv2, or a clientless TLS portal | Uses what the device already has |
Speed depends more on the implementation and the CPU than on the protocol family. WireGuard and kernel IPsec run in the kernel. OpenVPN traditionally ran in user space, but its data channel offload, available on Linux and Windows from version 2.6, moves the data path into the kernel too.
Running your own endpoint on a server
A VPN endpoint is an internet-facing service, so treat it like one:
- Open only the ports it needs: UDP 51820 (or your chosen port) for WireGuard, UDP 500 and 4500 for IPsec, and 443 for a TLS VPN.
- Enable IP forwarding only on a server that routes traffic for clients, and add matching firewall rules for the forwarded traffic.
- Expect MTU trouble on some links. If large transfers stall while small requests work, lower the tunnel MTU, for example
MTU = 1380in a WireGuard interface. - Keep the software current, and log connections somewhere you will actually look.
Size the server by CPU for encryption and by monthly transfer, because a full-tunnel VPN carries every byte its clients send and receive. A small CloudSat Cloud VPS is enough for a WireGuard hub serving a team, and hourly billing makes it cheap to test a design before committing.
Post-quantum readiness
Traffic recorded today could in principle be decrypted by a future quantum computer. WireGuard's optional pre-shared key adds a symmetric secret to each peer pair as a hedge. On the IPsec side, IKEv2 can combine several key exchanges (RFC 9370), and strongSwan 6 uses this to add ML-KEM to the handshake. Both are worth enabling for links that carry long-lived secrets.
FAQ
Is an SSL VPN less secure than IPsec?
Not inherently. Both use strong cryptography when configured well. The real risks are weak authentication, old software and slow patching of the gateway, whichever family it belongs to.
Can WireGuard replace IPsec everywhere?
Between machines you control, often yes. It cannot replace IPsec where the other end is a firewall or router that only speaks IPsec, which is still the case for many office and partner networks.
Does a VPN make my server safe from attacks?
It shrinks what is exposed: admin panels, databases and SSH can listen only on the tunnel. The VPN endpoint itself stays public, so it needs the same patching and monitoring as any other service.
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.




