{"id":6103,"date":"2018-08-08T13:55:58","date_gmt":"2018-08-08T09:55:58","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-setup-ikev2-vpn-using-strongswan-and-letsencrypt-on-centos-7\/"},"modified":"2018-08-08T13:55:58","modified_gmt":"2018-08-08T09:55:58","slug":"how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7\/","title":{"rendered":"How to Setup IKEv2 VPN Using Strongswan and Let&#8217;s encrypt on CentOS 7"},"content":{"rendered":"<p>Strongswan is an open source multiplatform IPSec implementation. It&#8217;s an IPSec-based VPN solution that focuses on strong authentication mechanisms. Strongswan offers support for both IKEv1 and IKEv2 key exchange protocols, authentication based on X.509 certificates or pre shared keys, and secure IKEv2 EAP user authentication.<\/p>\n<p>In this tutorial, I will show you\u00a0how to install an IPSec VPN server using Strongswan. We will create an IKEv2 VPN server with the &#8216;EAP-MSCHAPv2&#8217; authentication and be using Letsencrypt certificates on CentOS 7 server.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>CentOS 7 Server<\/li>\n<li>Root privileges<\/li>\n<\/ul>\n<h2 id=\"what-we-will-do\">What we will do?<\/h2>\n<ol>\n<li>Install Strongswan on CentOS 7<\/li>\n<li>Generate SSL Letsencrypt<\/li>\n<li>Configure Strongswan<\/li>\n<li>Enable NAT Firewall<\/li>\n<li>Enable Port-Forwarding<\/li>\n<li>Testing<\/li>\n<\/ol>\n<h2 id=\"step-install-strongswan-on-centos-\">Step 1 &#8211; Install Strongswan on CentOS 7<\/h2>\n<p>In this first step, we will install the strongswan IPsec implement software and all packages needed from the EPEL repository.<\/p>\n<p>Install the EPEL repository and install the strongswan package using yum commands below.<\/p>\n<p class=\"command\">yum -y install epel-release<br \/>yum -y install strongswan<\/p>\n<p>Wait for the strongswan package to be installed.<\/p>\n<p><a class=\"fancybox\" id=\"img-1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7.png\" alt=\"Install Strongswan on CentOS 7\" width=\"500\" height=\"247\" title=\"\"><\/a><\/p>\n<h2 id=\"step-generate-ssl-certificate-with-lets-encrypt\">Step 2 &#8211; Generate SSL Certificate with Let&#8217;s encrypt<\/h2>\n<p>We will create the IKEv2 VPN server using a domain name &#8216;ikev2.hakase-labs.io&#8217; and use certificates generated from letsencrypt.<\/p>\n<p>In this step, we will install the letsencrypt tool &#8216;certbot&#8217; and generate certificates for the server domain name &#8216;ikev2.hakase-labs.io&#8217;.<\/p>\n<p>Install &#8216;certbot&#8217; letsencrypt tool.<\/p>\n<p class=\"command\">yum -y install certbot<\/p>\n<p>After the certbot installation, we need to open the HTTP and HTTPS port of the server using firewall-cmd.<\/p>\n<p>Add the HTTP and HTTPS services to the firewalld service list by running firewall-cmd commands below.<\/p>\n<p class=\"command\">firewall-cmd &#8211;add-service=http &#8211;permanent<br \/>firewall-cmd &#8211;add-service=https &#8211;permanent<br \/>firewall-cmd &#8211;reload<\/p>\n<p><a class=\"fancybox\" id=\"img-2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-1.png\" alt=\"Generate SSL Certificate with Let&#039;s encrypt\" width=\"500\" height=\"184\" title=\"\"><\/a><\/p>\n<p>Now we can generate new SSL certificate files using the letsencrypt tool certbot.<\/p>\n<p>Run the certbot command below.<\/p>\n<p class=\"command\">certbot certonly &#8211;rsa-key-size 4096 &#8211;standalone &#8211;agree-tos &#8211;no-eff-email &#8211;email <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"523a333933213712353f333b3e7c313d3f\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a> -d ikev2.hakase-labs.io<\/p>\n<p>Letsencrypt certificates for the vpn domain name &#8216;ikev2.hakase-labs.io&#8217; has been generated, and are located at the &#8216;\/etc\/letsencrypt\/live&#8217; directory.<\/p>\n<p><a class=\"fancybox\" id=\"img-3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-2.png\" alt=\"SSL certificate obtained from Let&#039;s encrypt\" width=\"500\" height=\"216\" title=\"\"><\/a><\/p>\n<p>Next, we need to copy the certificate files &#8216;fullchain.pem&#8217;, &#8216;privkey.pem&#8217;, and the &#8216;chain.pem&#8217; to the &#8216;\/etc\/strongswan\/ipsec.d\/&#8217; directory.<\/p>\n<p class=\"command\">cp \/etc\/letsencrypt\/live\/ikev2.hakase-labs.io\/fullchain.pem \/etc\/strongswan\/ipsec.d\/certs\/<br \/>cp \/etc\/letsencrypt\/live\/ikev2.hakase-labs.io\/privkey.pem \/etc\/strongswan\/ipsec.d\/private\/<br \/>cp \/etc\/letsencrypt\/live\/ikev2.hakase-labs.io\/chain.pem \/etc\/strongswan\/ipsec.d\/cacerts\/<\/p>\n<p>All letsencrypt certificates for the Strongswan VPN named &#8216;ikev2.hakase-labs.io&#8217; have been generated and copied to the &#8216;\/etc\/strongswan\/ipsec.d&#8217; directory.<\/p>\n<p class=\"command\">tree \/etc\/strongswan\/ipsec.d\/<\/p>\n<p><a class=\"fancybox\" id=\"img-4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-3.png\" alt=\"SSL cert files\" width=\"500\" height=\"234\" title=\"\"><\/a><\/p>\n<h2 id=\"step-configure-strongswan\">Step 3 &#8211; Configure Strongswan<\/h2>\n<p>Go to the &#8216;\/etc\/strongswan&#8217; directory and backup the default &#8216;ipsec.conf &#8216;configuration file.<\/p>\n<p class=\"command\">cd \/etc\/strongswan\/<br \/>mv ipsec.conf ipsec.conf.asli<\/p>\n<p>Create a new one &#8216;ipsec.conf&#8217; using <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim<\/a>\u00a0editor.<\/p>\n<p class=\"command\">vim ipsec.conf<\/p>\n<p>And paste the following configuration.<\/p>\n<pre>#global configuration IPsec&#13;\n#chron logger&#13;\nconfig setup&#13; charondebug=\"ike 1, knl 1, cfg 0\"&#13; uniqueids=no&#13;\n&#13;\n#define new ipsec connection&#13;\nconn hakase-vpn&#13; auto=add&#13; compress=no&#13; type=tunnel&#13; keyexchange=ikev2&#13; ike=aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes256-aes128-sha256-sha1-modp2048-modp4096-modp1024,aes256-sha1-modp1024,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16-aes256gcm12-aes128gcm16-aes128gcm12-sha256-sha1-modp2048-modp4096-modp1024,3des-sha1-modp1024!&#13; esp=aes128-aes256-sha1-sha256-modp2048-modp4096-modp1024,aes128-sha1,aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes128gcm12-aes128gcm16-aes256gcm12-aes256gcm16-modp2048-modp4096-modp1024,aes128gcm16,aes128gcm16-ecp256,aes256-sha1,aes256-sha256,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16,aes256gcm16-ecp384,3des-sha1!&#13; fragmentation=yes&#13; forceencaps=yes&#13; dpdaction=clear&#13; dpddelay=300s&#13; rekey=no&#13; left=%any&#13; <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"b7dbd2d1c3ded38af7dedcd2c18599dfd6dcd6c4d29adbd6d5c499ded8\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13; leftcert=fullchain.pem&#13; leftsendcert=always&#13; leftsubnet=0.0.0.0\/0&#13; right=%any&#13; rightid=%any&#13; rightauth=eap-mschapv2&#13; rightsourceip=10.15.1.0\/24&#13; rightdns=1.1.1.1,8.8.8.8&#13; rightsendcert=never&#13; eap_identity=%identity<\/pre>\n<p>Save and exit.<\/p>\n<p>Configuration details:<\/p>\n<ul>\n<li>Create a new IPSec VPN tunnel connection named &#8216;hakase-vpn&#8217;.<\/li>\n<li>Specify the IKEv2 and ESP cipher suites for authentication.<\/li>\n<li>The &#8216;left&#8217; server configuration using a domain name &#8216;ikev2.hakase-labs.io&#8217; and using the letsencrypt certificate &#8216;fullchain.pem&#8217; located at the &#8216;\/etc\/strongswan\/ipsec.d\/certs&#8217; directory.<\/li>\n<li>The &#8216;right&#8217; clients\/remote setup with the EAP authentication method &#8216;eap-mschapv2&#8217;, assign the virtual IP address range &#8216;10.15.1.0\/24&#8217; to all connected clients, and using public DNS Cloudflare and google.<\/li>\n<\/ul>\n<p>Next, we need to edit the &#8216;ipsec.secrets&#8217; file to define the RSA server private key and EAP user password credentials.<\/p>\n<p>Edit the &#8216;ipsec.secrets&#8217; file.<\/p>\n<p class=\"command\">vim ipsec.secrets<\/p>\n<p>Paste the configuration below.<\/p>\n<pre>: RSA \"privkey.pem\"&#13;\nhakase : EAP \"<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"452d242e24362076777405\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>\"&#13;\ntensai : EAP \"<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"7206171c01131b41404332\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>\"<\/pre>\n<p>Save and exit.<\/p>\n<p>Configuration details:<\/p>\n<ul>\n<li>Specify the RSA server private key using the letsencrypt certificate &#8216;privkey.pem&#8217; located at the &#8216;\/etc\/strongswan\/ipsec.d\/private&#8217; directory.<\/li>\n<li>Define the EAP user credentials with format &#8216;user : EAP &#8220;password&#8221;&#8216;.<\/li>\n<\/ul>\n<p><a class=\"fancybox\" id=\"img-5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-4.png\" alt=\"Strongswan configuration\" width=\"500\" height=\"137\" title=\"\"><\/a><\/p>\n<p>The strongswan IPSec configuration has been completed. Start the strongswan service and enable\u00a0it to launch everytime at system boot.<\/p>\n<p class=\"command\">systemctl start strongswan<br \/>systemctl enable strongswan<\/p>\n<h2 id=\"step-enable-nat-in-firewalld\">Step 4 &#8211; Enable NAT in Firewalld<\/h2>\n<p>In this step, we will enable the NAT masquerading and add the IPSec protocols Authentication Header (AH) and Encapsulating Security Payload (ESP) on Firewalld using the &#8216;rich-rule&#8217; configuration.<\/p>\n<p>Add &#8216;AH&#8217; and &#8216;ESP&#8217; for authentication and encryption protocols to the firewalld.<\/p>\n<p class=\"command\">firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-rich-rule=&#8217;rule protocol value=&#8221;esp&#8221; accept&#8217;<br \/>firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-rich-rule=&#8217;rule protocol value=&#8221;ah&#8221; accept&#8217;<\/p>\n<p>Add the ipsec UDP ports and service.<\/p>\n<p class=\"command\">firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-port=500\/udp<br \/>firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-port=4500\/udp<br \/>firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-service=&#8221;ipsec&#8221;<\/p>\n<p>Now enable the NAT mode masquerade and reload the firewalld configuration rules.<\/p>\n<p class=\"command\">firewall-cmd &#8211;zone=public &#8211;permanent &#8211;add-masquerade<br \/>firewall-cmd &#8211;reload<\/p>\n<p><a class=\"fancybox\" id=\"img-6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-5.png\" alt=\"Firewalld NAT configuration\" width=\"500\" height=\"180\" title=\"\"><\/a><\/p>\n<p>The NAT mode on firewalld has been enabled, check using the command below.<\/p>\n<p class=\"command\">firewall-cmd &#8211;list-all<\/p>\n<p>Following is\u00a0the result.<\/p>\n<p><a class=\"fancybox\" id=\"img-7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-6.png\" alt=\"Firewall configuration\" width=\"500\" height=\"337\" title=\"\"><\/a><\/p>\n<h2 id=\"step-enable-portforwarding\">Step 5 &#8211; Enable Port-Forwarding<\/h2>\n<p>To enable port-forwarding, we need to edit the &#8216;sysctl.conf&#8217; file.<\/p>\n<p>Edit the &#8216;\/etc\/sysctl.conf&#8217; file using vim editor.<\/p>\n<p class=\"command\">vim \/etc\/sysctl.conf<\/p>\n<p>Paste the following configuration there.<\/p>\n<pre>net.ipv4.ip_forward = 1&#13;\nnet.ipv4.conf.all.accept_redirects = 0&#13;\nnet.ipv4.conf.all.send_redirects = 0&#13;\n<\/pre>\n<p>Save and exit, now reload using the sysctl command below.<\/p>\n<p class=\"command\">sysctl -p<\/p>\n<p>Port-forwarding has been enabled. Now restart the strongswan service.<\/p>\n<p class=\"command\">systemctl restart strongswan<\/p>\n<p><a class=\"fancybox\" id=\"img-8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-7.png\" alt=\"Configure port forwarding in sysctl.conf\" width=\"500\" height=\"185\" title=\"\"><\/a><\/p>\n<h2 id=\"step-testing-strongswan-ipsec-vpn\">Step 6 &#8211; Testing Strongswan IPSec VPN<\/h2>\n<p>In this case, we will do the test on the MacOS X and android phone.<\/p>\n<h3 id=\"on-macos\">On MacOS<\/h3>\n<p>&#8211; Open the &#8216;System Preferences&#8217; and click the &#8216;Network&#8217; menu.<\/p>\n<p>Click the &#8216;+&#8217; button to create a new VPN connection.<\/p>\n<ul>\n<ul>\n<li>Interface: &#8216;VPN&#8217;<\/li>\n<li>VPN Type: &#8216;IKEv2&#8217;<\/li>\n<li>Service Name: &#8216;IKEv2-vpn<\/li>\n<\/ul>\n<\/ul>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-8.png\" alt=\"Configure VPN on MacOS\" width=\"500\" height=\"393\" title=\"\"><\/a><\/p>\n<p>&#8211; On the &#8216;Server Address&#8217; and &#8216;Remote ID&#8217;, type the VPN domain name &#8216;ikev2.hakase-labs.io&#8217;.<br \/>&#8211; Click &#8216;Authentication Settings&#8217;.<br \/>&#8211; Authentication using a &#8216;Username&#8217;.<br \/>&#8211; Type the username &#8216;tensai&#8217; with password &#8216;<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"c7b3a2a9b4a6aef4f5f687\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#8216;<br \/>&#8211; Click &#8216;OK&#8217; and click &#8216;Apply&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-10\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-9.png\" alt=\"MacOS VPN authentication settings\" width=\"500\" height=\"391\" title=\"\"><\/a><\/p>\n<p>New IKEv2 VPN connection has been created on the client. Now click the connect button.<\/p>\n<p><a class=\"fancybox\" id=\"img-11\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/11.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-10.png\" alt=\"New IKEv2 VPN connection has been created\" width=\"500\" height=\"391\" title=\"\"><\/a><\/p>\n<p>And the client has been connected to the strongswan VPN server and has an internal\/private IP address 10.15.1.1.<\/p>\n<h3 id=\"on-android\">On Android<\/h3>\n<p>&#8211; Download and install the native strongswan android application from Google-Play.<br \/>&#8211; Add new VPN profile<br \/>&#8211; Type the server domain name &#8216;ikev2.hakase-labs.io&#8217; and use the IKEv2 EAP Username and Password authentication.<\/p>\n<p>Following\u00a0is the result when we connect to the VPN server.<\/p>\n<p><a class=\"fancybox\" id=\"img-12\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_ikev2_vpn_using_strongswan_and_letsencrypt_on_centos_7\/big\/12.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-11.png\" alt=\"Configure VPN on Android\" width=\"500\" height=\"489\" title=\"\"><\/a><\/p>\n<p>The IKEv2 IPSec-based VPN server has been created using Strongswan and Letsencrypt on CentOS 7 server.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-setup-ikev2-vpn-using-strongswan-and-letsencrypt-on-centos-7%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-12.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-setup-ikev2-vpn-using-strongswan-and-letsencrypt-on-centos-7%2F&amp;text=How+to+Setup+IKEv2+VPN+Using+Strongswan+and+Let%27s+encrypt+on+CentOS+7&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-13.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-14.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-setup-ikev2-vpn-using-strongswan-and-letsencrypt-on-centos-7%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/08\/how-to-setup-ikev2-vpn-using-strongswan-and-lets-encrypt-on-centos-7-15.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Strongswan is an open source multiplatform IPSec implementation. It&#8217;s an IPSec-based VPN solution that focuses on strong authentication mechanisms. Strongswan offers support for both IKEv1 and IKEv2 key exchange protocols, authentication based on X.509 certificates or pre shared keys, and secure IKEv2 EAP user authentication. In this tutorial, I will show you\u00a0how to install an &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-6103","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=6103"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6103\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=6103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=6103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=6103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}