Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is IPsec?

IPsec encrypts and authenticates traffic at the network layer, so every protocol above it is protected without modification. It underpins most site-to-site VPNs.

Illustration for the cybersecurity term IPsec
Home / Blog / Cybersecurity Terms / What Is IPsec?
17 November 2026

What Is IPsec?

What Is IPsec?

IPsec is a suite of protocols that protects traffic at the IP layer. Because it operates below the transport layer, every application above it is covered without being aware of it: a database connection, a legacy protocol with no encryption of its own, and a file transfer all travel protected across the same tunnel. The architecture is set out in RFC 4301, and the current key exchange, IKEv2, in RFC 7296.

The Three Components

Encapsulating Security Payload (ESP, RFC 4303) provides confidentiality, integrity, and authentication of the payload. It is what nearly every deployment uses.

Authentication Header (AH, RFC 4302) provides integrity and authentication but no encryption, and it covers parts of the outer IP header, which makes it incompatible with network address translation. It is effectively obsolete; if you find it in a configuration, question why.

Internet Key Exchange negotiates the algorithms, authenticates the peers, and derives the keys. IKEv2 replaced IKEv1 and is better in every respect: fewer round trips, built-in dead peer detection, native NAT traversal, and MOBIKE for connections that change address. New deployments should use IKEv2 only.

Tunnel Mode and Transport Mode

In tunnel mode the entire original packet is encrypted and wrapped in a new IP header. The endpoints of the tunnel are gateways, and the hosts behind them need no configuration. This is how site-to-site connections and remote access VPNs work.

In transport mode only the payload is protected and the original header is retained. Both communicating hosts must implement IPsec. It is used for host-to-host protection, for Windows domain isolation policies, and as the inner layer in some L2TP arrangements.

Choosing Algorithms

Defaults on older equipment are frequently unacceptable, and this is where most audit findings land.

SettingUseAvoid
EncryptionAES-GCM 128 or 2563DES, DES, AES-CBC with no integrity
IntegrityBuilt into GCM, or SHA-256 and aboveMD5, SHA-1
Diffie-Hellman group19, 20, 21 (elliptic curve) or 14 and aboveGroups 1, 2, and 5
AuthenticationCertificates, or EAP for remote usersShared secrets, particularly short ones

Group 1 and group 2 are breakable by well-resourced adversaries, as the Logjam research set out in 2015. Pre-shared keys deserve a specific warning: with IKEv1 aggressive mode, a passive observer can capture the hash and attack the key offline, and most organisations choose keys that fall to a dictionary in minutes. Use certificates for site-to-site links and EAP with a certificate-authenticated server for remote access. The NCSC publishes recommended IPsec profiles, and following them removes most of the guesswork.

Perfect Forward Secrecy and Rekeying

Enable PFS so that each child security association derives fresh key material from a new Diffie-Hellman exchange. Without it, compromise of one key exposes everything protected by that association. Set rekey intervals in the region of eight hours for the IKE SA and one hour for child SAs, and make sure both ends agree, because mismatched lifetimes cause the intermittent tunnel drops that consume so much network troubleshooting time.

Where the Real Risk Sits

The cryptography is rarely the problem. The VPN gateway is. Internet-facing concentrators have been the single most exploited category of enterprise infrastructure in recent years: the Ivanti Connect Secure chain of CVE-2023-46805 and CVE-2024-21887 exploited from December 2023, the Fortinet SSL-VPN vulnerabilities before it, and the Citrix and Pulse Secure flaws before that. These devices terminate trusted traffic, hold credentials, and sit at the perimeter, which makes them the ideal entry point.

Treat them accordingly. Patch on an emergency schedule rather than a quarterly one, require multi-factor authentication on every remote access tunnel, restrict management interfaces to an administrative network, and send gateway logs to your SIEM. Then look at what the tunnel grants: a flat route into the corporate network is an outdated design, and ZTNA or at minimum tight per-tunnel access rules should replace it for user access, with IPsec retained for the site-to-site and cloud interconnect cases where it remains the right tool.

Our Infrastructure Security Testing Services review VPN configuration, cipher policy, and the access the tunnel actually provides.

FAQ – Frequently Asked Questions

Is IPsec Better Than an SSL VPN?

They serve different purposes. IPsec is efficient and application-agnostic, which suits site-to-site links and cloud interconnects. SSL and TLS-based VPNs traverse restrictive networks more easily because they use port 443 and are simpler for remote users. Security depends far more on the gateway’s patch level, the authentication required, and the access granted than on the protocol.

Do I Still Need AH?

No. Authentication Header provides integrity without confidentiality and breaks when traffic passes through network address translation, because it covers parts of the outer IP header. ESP provides integrity as well as encryption and works through NAT with UDP encapsulation. Modern deployments use ESP exclusively, and an AH configuration in a live environment is usually a legacy artefact.

Why Does My IPsec Tunnel Drop Intermittently?

Mismatched lifetimes between the two peers are the most common cause, where one side rekeys at a different interval from the other. Other frequent culprits are NAT keepalive timers expiring on an intermediate device, MTU and fragmentation issues with large packets, and dead peer detection settings that differ. Compare both configurations line by line before changing anything.

Which Diffie-Hellman Groups Should I Avoid?

Groups 1, 2, and 5 use 768, 1024, and 1536-bit modular exponentiation and are considered inadequate; the Logjam research in 2015 showed that widely reused 1024-bit parameters are within reach of a well-resourced adversary. Use elliptic curve groups 19, 20, or 21, or group 14 and above if elliptic curve is unavailable on legacy equipment.

Related Terms

You May Be Interested In These

What Is Modbus Security?

Cybersecurity Terms

17 November 2026

What Is Modbus Security?

Read More
What Is DNP3 Security?

Cybersecurity Terms

17 November 2026

What Is DNP3 Security?

Read More
What Is Mobile Application Security?

Cybersecurity Terms

17 November 2026

What Is Mobile Application Security?

Read More