IPSec VPN Site-to-Site with Strongswan (Pre shared key)

Created by Dylan van Elst, Modified on Thu, 23 Dec 2021 at 11:05 AM by Dylan van Elst

Settings mentioned below will follow the example above. Please change the settings for your network.

  1. Install a Strongswan server and use the config below:
    config setup    # General configuration parameters
      uniqueids = yes
      charondebug = "all"
    conn vpn-to-peplink    # Defines a connection
      left=       # Public IP of local server. is any
      leftid=     # ID of local server
      leftsubnet=  # Subnet of local server
      right=      # Public IP of remote server. is any
      rightid=     # ID of remote server
      rightsubnet=  # Subnet of remote server
      ike=aes256-sha1-modp1536  # IKE encryption algorithms
      esp=aes256-sha1    # ESP encryption algorithms
      keyexchange=ikev2    # IKEv1 or IKEv2
      ikelifetime=1h      # Ike lifetime
      lifetime=8h      # Phase-2 lifetime


    : PSK "Peplink2020"    # Pre shared key

  2. Create a IPSec profile on the Peplink router under Network/Advanced > IPsec VPN and click on New Profile. And use the config below:

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article