Installing strongSwan on Windows 11

  1. Download the Win64 MSI file for strongSwan from the official website: https://www.strongswan.org/.

  2. Double-click the downloaded MSI file to begin the installation process.

  3. Follow the on-screen instructions to complete the installation. Be sure to select the desired options when prompted.

  4. Once the installation is complete, navigate to the installation directory (by default: C:\Program Files\strongSwan\).

  5. Open the ipsec.conf file in a text editor (such as Notepad).

  6. Edit the configuration to fit your needs. A basic configuration for connecting to a remote VPN server might look something like this:

conn myvpn
   left=%defaultroute
   leftsubnet=0.0.0.0/0
   leftfirewall=yes
   right=<remote-server-ip>
   rightsubnet=<remote-subnet>
   authby=secret
   auto=start
  1. Save the ipsec.conf file.

  2. Open the ipsec.secrets file in a text editor.

  3. Add the shared secret for your VPN connection to the file. This is typically provided by your VPN provider.

<local-ip> <remote-ip> : PSK "<shared-secret>"
  1. Save the ipsec.secrets file.

  2. Open the Command Prompt as an administrator.

  3. Navigate to the installation directory (by default: C:\Program Files\strongSwan\).

  4. To start the strongSwan service, enter the following command:

net start ikeext
  1. To connect to your VPN, enter the following command:
ipsec up myvpn
  1. To disconnect from your VPN, enter the following command:
ipsec down myvpn

Congratulations! You have successfully installed strongSwan and connected to your VPN on Windows 11.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!