Have you ever been confused by the terms used to define VPNs? Perhaps you’ve heard the term IKEv2 (Internet Key Exchange version 2) — but nobody has ever explained to you what it is? In that specific case, you’re in luck — this article is meant to introduce you to IKEv2 and what it means for you as a VPN user.
Table of contents
What is IKEv2?
In computing, IKEv2 is a VPN tunneling protocol ensuring safe online communication between two devices. IKEv2 works with the IPsec protocol, forming a VPN protocol called IKEv2/IPSec. IKEv2 helps devices recognize each other, and the IPsec protocol provides security when transporting data.
IKE builds upon the Oakley Key Determination Protocol and ISAKMP, both of which define widely accepted methods for two devices to exchange data needed to create security keys (for encrypting data) via an unsecured connection.
Imagine you want to send a secret message to a stranger. If you encrypt it/write it in cipher, then nobody who intercepts it will be able to read it — but neither will your recipient. How do you exchange the cipher used to read the message when you don’t know the recipient? That’s what IKEv2 carries out by doing something akin to the wolf–sheep–cabbage problem.
IKEv2 uses X.509 certificates (a standard of identifying that a public key belongs to you) for the devices to introduce themselves. Then they create a “shared secret” via a Diffie–Hellman key exchange algorithm, which is best explained here.
All of this means that IKEv2 works on publicly tested and widely accepted standards of cryptographic security.
Why are IKEv2 and IPsec always together?
IKEv2 was welded to IPSec by a joint effort between Microsoft and Cisco. The merging of IKEv2 and IPsec is one of the secrets of its speed.
IKEv2 runs in the user space, which grants it access to data storage. It allows it to easily retrieve any configuration data required for a security association.
On the other hand, IPsec runs in the kernel, the deep layer of the computer systems that controls everything. It allows it to process data at much greater speeds.
Working together, IKEv2 uses a few data packets to establish a security association with the server. It then takes all the data — the IP addresses, the security measures used, and the ports utilized in the connection — and gives it to IPsec, which then uses the security associations to encrypt the traffic.
What does IPsec do exactly? I’m glad you asked — we have a great article explaining the basics of IPsec VPNs. It also goes on to explain why it’s usually referred to as IKEv2 rather than the full name IKEv2/IPsec (in short, it’s because IKEv2 was implemented in 2005 — a much newer development than IKEv1 and IPsec of 1995).
What’s the difference between IKEv1 and IKEv2?
Now, you might be wondering what’s so special about the different versions. Well, there are quite a few differences between IKEv1 and IKEv2, the specifics of which mostly matter to people running VPNs. To boil it down, here are the four most important things:
- IKEv2 runs faster and more efficiently due to the pruning and optimization of some of the processes;
- IKEv2 consumes less bandwidth;
- IKEv2 has built-in NAT (Network address translation) traversal;
- IKEv2 supports EAP (Extensible Authentication Protocol), making it safer.
Is IKEv2 VPN safe?
The short answer is yes.
A VPN protocol’s security comes down to implementation and issues inherent to the protocol itself. IKEv2 has no known vulnerabilities on its own.
So, if your VPN provider configures IKEv2 properly, it will not have security issues.
How to set up IKEv2 on my device
The easiest way to set up IKEv2 on your device is to get a VPN service that supports IKEv2. So, for macOS, iOS, and Android users, the instructions can be as simple as this:
- Subscribe to Surfshark;
- Download and install the app;
- Switch to IKEv2 by going to Settings > VPN settings > Protocol.
And that’s it!
Now, if you want to do it manually or set it up on Windows or Linux, that can be a lot harder.
How to set up IKEv2 on Windows 11
Do you have a VPN provider and the settings for the server you’ll connect to? Then do this:
- Open “Search” (click on the magnifying glass next to the Windows icon on the taskbar);
- Type in “VPN;”
- Choose VPN settings;
- Click “Add VPN;”
- Enter the required data;
- Click the internet connection/audio/battery (if laptop) icon next to the clock on the taskbar;
- Click “VPN;”
- Choose the connection you created;
- Click connect.
How to set up IKEv2 on macOS
Here’s our guide to setting up IKEv2 with Surfshark as your provider. If you have another provider and their security certificate already installed on your system, here’s what you do:
- Access System Preferences and select “Network;”
- In the network window, click the “+” icon and enter the required settings before clicking “Create:”
- Interface: VPN;
- VPN Type: IKEv2;
- Service Name: you can select any name you prefer.
- Fill in the Server Address and Remote ID you got from your VPN provider;
- Click on the “Authentication Settings…” button, select “Username” as the authentication method, and enter your credentials;
- Press “OK” and apply the settings;
- Click Connect to establish a connection;
- If you’ve checked the “Show VPN status in menu bar” box, you can now easily connect and disconnect straight from the menu bar.
How to set up IKEv2 on my Android
If you are a Surfshark user, here’s a guide for setting up IKEv2 manually on Android. If you’re not, you’ll need to have a security certificate from your VPN provider and then do this:
- Get the strongSwan VPN client app on Google Play;
- Open the strongSwan app, tap on three vertical dots on the top, and choose “CA certificates;”
- On the certificate list, tap on the three vertical dots and choose “Import certificate;”
- Find your certificate, tap it, then tap “Import certificate;”
- Get back to the main screen of strongSwan and tap “Add VPN;”
- In the “Server” field, enter the hostname of your VPN server;
- In the “Username” and “Password” fields, enter the service credentials;
- Enter whatever you want in the profile name field;
- Tap “Save;”
- Back on the main screen, tap on the new profile to connect;
- That’s it!
Hot to set up IKEv2 on Ubuntu
Assuming you already have a VPN supplier and a server handy, here’s what you do:
- Open the terminal;
- Enter “sudo apt-get install -y strongswan network-manager-strongswan libcharon-extra-plugins;”
- Open “Connection Settings” and choose “Wired Connections,” then “Wired Setting;”
- Click the huge plus sign next to “VPN;”
- Choose IKEv2;
- Enter your username, password, and other details of the VPN connection;
- Click “Add;”
- Now you can connect to a VPN!
How to set up IKEv2 on iOS
Here’s our guide to setting up IKEv2 on iOS with Surfshark. If you have another provider and their security certificate already installed on your system, here’s what you do:
- Open the Settings app on your device, go to “General,” and tap on the VPN tab;
- Select “Add VPN Configuration…” and fill in all the required details:
- Type: IKEv2;
- Description: your preferred name of this connection;
- Server: the hostname of the server.
- Remote ID: the same hostname that you entered in the “Server” field;
- Local ID: leave empty;
- User Authentication: choose “Username;”
- Username: your VPN service username;
- Password: your VPN service password;
- Proxy: off.
- Press “Done” after entering all the details;
- Your VPN connection can now be found in the VPN tab in Settings > General.
How does IKEv2 compare to other protocols?
Naturally, there are other protocols besides IKEv2, and people always want to know how they compare with one another.
There’s a lot of misinformation regarding VPN protocols on the internet — mainly that the protocols themselves can be compared. Here’s what really sums up the VPN protocol speed and security:
- A protocol with no known vulnerabilities is considered secure;
- Your VPN connection speed mostly depends on:
- Your internet service quality;
- The quality of your device;
- VPN server throughput and load;
- Your proximity to the VPN server.
So, which protocols match the security criteria? Mainly three – OpenVPN, WireGuard®, and IKEv2. All other popular protocols have either been exploited (PPTP, L2TP/IPSec) or never audited (SSTP).
At the end of the day, how any VPN protocol performs depends on how your device interacts with the VPN server configuration. So, use a provider you trust and a VPN protocol that works best for you!
“WireGuard” is a registered trademark of Jason A. Donenfeld.
IKEv2 vs. OpenVPN: which is better?
IKEv2 and OpenVPN are very similar when it comes to being a regular VPN user.
- Both protocols are very safe: they allow for many cryptographic algorithms and have no known exploits;
- IKEv2 is technically faster: a different approach to encryption means that IKEv2 is almost invariably faster than OpenVPN. Whether the difference in speed is meaningful is another question;
- IKEv2 is technically easier to set up: many OS and mobile systems natively support IKEv2. To manually set up OpenVPN, the user needs to download an installer:
- IKEv2 is more stable: IKEv2 handles reconnections better than OpenVPN;
- IKEv2 auto-reconnects: not that you need to keep an eye on OpenVPN, but mobile users will appreciate the stability that comes with it.
In the end, both of these protocols are good, though IKEv2 is more beneficial for mobile users.
What are the benefits and downsides of IKEv2?
IKEv2 has abundant benefits and very few downsides, including:
IKEv2/IPsec encryption has kept up with the march of progress and is as secure as any other protocol out there.
Combined with wide device support, this means that IKEv2/IPsec allows you to secure devices that may not be able to run the newest VPN protocols.
IKEv2/IPsec switches smoothly between networks as you move, maintaining a stable connection at all times.
Mobile users find this very handy since they’re always on the move.
KEv2/IPsec is very efficient with device resources. This not only makes it faster but also gentler on weaker devices.
This is important for smartphone users as they don’t have as much power to spare as, say, laptop users.
IKEv2/IPsec can be implemented on computers, routers, and smartphones because it supports quite a few different platforms/operating systems.
A secure VPN protocol only does you any good if your device can use it. With IKEv2/IPsec, it probably does.
The downsides don’t even merit a table: WireGuard is newer and faster than IKEv2.
Is IKEv2 compatible with my device?
A VPN protocol’s compatibility depends on how it is implemented. Here’s how Surfshark does it:
- Windows: No (most users switched to WireGuard)
- Android: Yes
- iOS: Yes
- macOS: Yes
- Linux: No
IKEv2 has, for the longest time, been the recommended protocol for mobile devices, and it hasn’t gotten worse in that role.
In conclusion: IKEv2 is IKE-OK
IKEv2 is a widely trusted and accepted VPN protocol. Working in tandem with IPsec provides access to quality VPN connections on many platforms. Even better, its connectivity makes it most attractive to mobile users, who should always be mindful of their resources. That’s why it’s one of the protocol choices available to Surfshark VPN users — why not become one yourself and check it out?
Is IKEv2 good for gaming?
IKEv2 is a good VPN protocol for gaming as it is fairly light on resource use.
Is IKEv2 VPN safe?
Yes. IKEv2 doesn’t have known vulnerabilities and is protected by potent encryption.
Is IKEv2 VPN free?
IKEv2 VPN is both free and not free:
- It’s free in that it’s natively supported by basically any OS;
- It’s not free because it still won’t work without a properly configured VPN server (this applies to every VPN protocol).
Which is better: OpenVPN or IKEv2?
IKEv2 is definitely better for mobile devices due to its more efficient use of hardware resources and ease of reconnecting.
Comedy answer: WireGuard.
Which is better: IKEv2 or L2TP?
IKEv2 offers much better security than L2TP.
Is IKEv2 safer than IKEv1?
IKEv2 is safer than IKEv1 due to its EAP (Extensible Authentication Protocol) support. It’s also faster and works better.
What does IKEv2 mean on an iPhone?
On an iPhone, IKEv2 is one of the VPN protocols supported by iOS. IKEv2 also means the same thing anywhere else.