Working one layer below the application makes IPsec universal
Because IPsec operates at the IP layer rather than inside any single application, it protects traffic regardless of which app generated it β a browser, an email client, or a database connection all get the same protection automatically once IPsec is active on the connection. That's the core reason it became the default choice for securing entire network links rather than individual app sessions.
ESP and tunnel mode became the practical default combination
While AH and transport mode both exist as valid parts of the IPsec standard, real-world deployments have converged heavily on ESP (for encryption plus authentication) paired with tunnel mode (for full packet protection and hidden internal addressing) β largely because that combination handles modern network realities like NAT and firewalls far more smoothly than the alternatives.
IPsec compared with other VPN technologies
IPsec is standardized and widely supported by routers, firewalls and operating systems, which makes it a common choice for connecting sites from different vendors. SSL/TLS-based VPNs and OpenVPN work at a higher level and are often easier to pass through restrictive firewalls, while WireGuard is a newer protocol designed for a small code base and simple configuration. None of them is best in every case; the right pick depends on the equipment you have, who must connect, and how much configuration effort you accept.
Troubleshooting a tunnel that will not come up
Work through it in order. First confirm basic reachability between the two gateway addresses. Then check that both sides use the same settings for the IKE version, the encryption and hash algorithms, the Diffie-Hellman group, the authentication method and the lifetimes. Check that the local and remote subnets are mirror images of each other, because a mismatch in the traffic selectors is a very common cause of failure. Verify that firewalls pass UDP 500, UDP 4500 and ESP, and look at the logs on both ends, since the error on one side is often explained by the other side's message.
Frequently Asked Questions
Do I need to choose between AH and ESP myself when setting up a VPN?
Rarely β nearly all modern VPN software and hardware default to ESP because it covers both encryption and authentication, and most consumer or business VPN setups won't even present AH as a practical option.
What's the simplest way to remember the difference between transport and tunnel mode?
Transport mode protects the letter but keeps the original envelope showing; tunnel mode seals the entire original letter and envelope inside a brand-new envelope with a different address on it.
Why does IPsec often have problems behind home routers?
Home routers use NAT, which rewrites addresses and can confuse protocols that carry address information inside the packet. NAT traversal solves most of this by encapsulating ESP in UDP, but older devices or restrictive networks may still block it.
Is IKEv2 really better than IKEv1?
In most respects yes: IKEv2 is simpler, has fewer message exchanges, supports reconnection after a network change, and is better suited to mobile devices. Some older equipment supports only IKEv1, so check what both ends can use.
Does IPsec hide which websites I visit?
It encrypts the traffic between the two tunnel endpoints, so an observer between them cannot read the content or the inner destinations. The VPN gateway at the far end still sees the destinations, and the traffic is not private once it leaves the tunnel.