Set up ProtonVPN IKEv2 Connection on Linux

2 min read 1 year ago
Published on May 03, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Tutorial: Setting up ProtonVPN IKEv2 Connection on Linux

Prerequisites:

  • Linux machine running Mint 18.3 Sylvia

Steps:

  1. Install Necessary Packages:

    • Open the terminal using Ctrl + T.
    • Enter the following commands to install the required packages:
      sudo apt-get install strongswan
      sudo apt-get install libstrongswan-extra-plugins
      
    • Enter your root password when prompted to allow installation.
  2. Download ProtonVPN Certificate:

    • Download the ProtonVPN certificate from protonvpn.com.
    • Place the certificate in the appropriate directory using the following command:
      sudo mv /tmp/protonvpn_root.pem /etc/ipsec.d/cacerts/
      
  3. Configure IKEv2 Connection:

    • Open the ipsec.conf file with a text editor (e.g., nano) using the command:
      sudo nano /etc/ipsec.conf
      
    • Delete the existing text up to "add connections here" and replace it with the provided configuration parameters.
    • Save the file by pressing Ctrl + X, then Y to confirm, and finally press Enter.
  4. Add Credentials:

    • Open the ipsec.secrets file with a text editor using the command:
      sudo nano /etc/ipsec.secrets
      
    • Enter the following text in the file:
      your_username : EAP "your_password"
      
    • Replace your_username with your ProtonVPN IKEv2 username and your_password with your corresponding password.
    • Save the file by pressing Ctrl + X, then Y to confirm, and finally press Enter.
  5. Restart IPsec Service:

    • Restart the IPsec service by running the command:
      sudo ipsec restart
      
  6. Connect to ProtonVPN Server:

    • To connect to the VPN server, use the command:
      sudo ipsec up your_connection_name
      
    • Replace your_connection_name with the name you provided in the ipsec.conf file.
    • If the connection is successful, you should see a confirmation message.
  7. Disconnect from the Server:

    • To terminate the connection, use the command:
      sudo ipsec down your_connection_name
      
    • Replace your_connection_name with the name of your connection.

Congratulations! You have successfully set up a ProtonVPN IKEv2 connection on your Linux machine.