Skip to content

[UNMAINTAINED] Setup a (really) strong StrongSwan VPN Server for Ubuntu and Debian

Notifications You must be signed in to change notification settings

DorianPeregrim/setup-strong-strongswan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 

Repository files navigation

Setup a Strongswan IPSec (& L2TP) Server

Installation

For DigitalOcean Ubuntu droplet:

apt-get install gcc libssl-dev
sudo apt-get install --reinstall make

This script doesn't need a domain or specific public IP to work.

curl -L -O https://raw.github.com/DorianPeregrim/setup-strong-strongswan/master/setup.sh
chmod +x setup.sh
./setup.sh

The script will lead you through the installation process. If you haven't run this script before it will ask you to enter credentials for the VPN, namely:

  • a username
  • a password
  • a PSK (pre-shared key)

For upgrading Strongswan you can just run the script again. Remember to back up your custom IPSec configuration files beforehand.

Usage

This installs the vpn-assist init.d script. Systemd is backwards compatible to these scripts and thus you can use it to start|stop|restart the VPN server, which should also start itself automatically on startup.

You can manage accounts for your VPN via /etc/ipsec.secrets and etc/ppp/chap-secrets. @zackdevine's account managing script automates this process

Configuration MacOS

In network settings create new VPN connection L2TP type. Server Address: droplet public ip Account name: generated by script username

Go to authentication settings and set password and pre-shared key. Next open additional settings and check Send all traffic through VPN. Push connect. It's work!

If no connection, try execute on VPN server:

/etc/init.d/vpn-assist restart

Uninstallation

Download the Strongswan source and run:

make uninstall

Then uninstall xl2tpd and remove /etc/init.d/vpn-assist. That should suffice for a rather clean uninstallation.

About

[UNMAINTAINED] Setup a (really) strong StrongSwan VPN Server for Ubuntu and Debian

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%