**IMPORTANT:** This guide is for **advanced users** ONLY. Other users please use <ahref="clients.md"target="_blank">IPsec/L2TP</a> or <ahref="clients-xauth.md"target="_blank">IPsec/XAuth</a>.
Windows 7 and newer releases (including Windows Phone 8.1 and newer) support the IKEv2 and MOBIKE standards through Microsoft's Agile VPN functionality. Internet Key Exchange (IKE or IKEv2) is the protocol used to set up a security association (SA) in the IPsec protocol suite. Compared to IKEv1, IKEv2 has <ahref="https://en.wikipedia.org/wiki/Internet_Key_Exchange#Improvements_with_IKEv2"target="_blank">many improvements</a> such as Standard Mobility support through MOBIKE, and improved reliability.
Libreswan can authenticate IKEv2 clients on the basis of X.509 Machine Certificates using RSA signatures. This method does not require an IPsec PSK, username or password. Besides Windows, it can also be used with <ahref="https://wiki.strongswan.org/projects/strongswan/wiki/AndroidVpnClient"target="_blank">strongSwan Android VPN client</a>. The following examples show how to configure IKEv2.
First, make sure you have successfully <ahref="https://github.com/hwdsl2/setup-ipsec-vpn"target="_blank">set up your VPN server</a>. Commands below must be run as `root`.
Repeat this step for additional VPN clients, but replace every `winclient` with `winclient2`, etc.
1. The database should now contain:
```bash
$ certutil -L -d sql:/etc/ipsec.d
Certificate Nickname Trust Attributes
SSL,S/MIME,JAR/XPI
Example CA CTu,u,u
($PUBLIC_IP) u,u,u
winclient u,u,u
```
Note: To delete a certificate, use `certutil -D -d sql:/etc/ipsec.d -n "Certificate Nickname"`.
1. Restart IPsec service:
```bash
$ service ipsec restart
```
1. The `winclient.p12` file should then be securely transferred to the Windows client computer and imported to the Computer certificate store. The CA cert once imported must be placed (or moved) into the "Certificates" sub-folder under "Trusted Root Certification Authorities".
Once successfully connected, you can verify that your traffic is being routed properly by <ahref="https://encrypted.google.com/search?q=my+ip"target="_blank">looking up your IP address on Google</a>. It should say "Your public IP address is `Your VPN Server IP`".
The built-in VPN client in Windows 7 and newer does not support IKEv2 fragmentation. On some networks, this can cause the connection to fail with "Error 809", or you may be unable to open any website after connecting. If this happens, first try <ahref="clients.md#troubleshooting"target="_blank">this workaround</a>. If it doesn't work, please connect using <ahref="clients.md"target="_blank">IPsec/L2TP</a> or <ahref="clients-xauth.md"target="_blank">IPsec/XAuth</a> instead.