Support Center

VPN Setup for Ubuntu : IKEv2 Protocol

Last Updated: Feb 07, 2017 12:24PM +03
StrongSwan, an IKEv1 and IKEv2 daemon for Linux, is the backend for GUI tools like network-manager-strongswan or such. Usually, GUI tools have issues with improper configuration of StrongSwan and the end result is: it does not work.
 
1 Install strongswan
 
sudo apt-get install strongswan strongswan-plugin-eap-mschapv2
 
2. Edit /etc/ipsec.secrets file and add your credentials.
YOUR_USERNAME : EAP "YOUR_PASSWORD"
 
3. Open the /etc/ipsec.conf file with your favorite text editor. Erase everything from it and paste the following lines. Replace USERNAME with your username and SERVER with one of our VPN server.
 
conn vpn
 keyexchange=ikev2
 dpdaction=clear
 dpddelay=300s
 eap_identity="USERNAME"
 leftauth=eap-mschapv2
 left=%defaultroute
 leftsourceip=%config
 right=SERVER
 rightauth=pubkey
 rightsubnet=0.0.0.0/0
 rightid=%any
 type=tunnel
 auto=add
 
4. Edit the file /etc/strongswan.d/charon/constraints.conf and change "load = yes" to "load = no".
 
5. Our VPN servers identify themselves using certificates. StrongSwan needs to verify server certificate and in order to do so it searches it's certificates store. Fortunately, StrongSwan's certificate store can easily be linked to the system ( OpenSSL ) certificate store. To link the StrongSwan's certificate store to the system ( OpenSSL ) certificate store execute the following two commands:
 
sudo rmdir /etc/ipsec.d/cacerts
sudo ln -s /etc/ssl/certs /etc/ipsec.d/cacerts
 
6. Restart the strongswan daemon to adopt the new configuration.
 
sudo ipsec up vpn
 
7. To disconnect use:
sudo ipsec down vpn
 
8. To check status of connection:
sudo ipsec status vpn
 
 

Contact Us

  • Email Us
http://assets3.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete