Add support for Ubuntu 16.04 (Xenial)
This commit is contained in:
parent
4976bde854
commit
d909b986cf
10
README.md
10
README.md
@ -1,6 +1,6 @@
|
||||
# IPsec/L2TP VPN Server Auto Setup Scripts
|
||||
|
||||
Scripts for automatic configuration of IPsec/L2TP VPN server on Ubuntu 14.04 & 12.04, Debian 8 and CentOS/RHEL 6 & 7. All you need to do is providing your own values for `IPSEC_PSK`, `VPN_USER` and `VPN_PASSWORD`, and let them handle the rest.
|
||||
Scripts for automatic configuration of an IPsec/L2TP VPN server on Ubuntu 16.04/14.04/12.04, Debian 8 and CentOS 6 & 7. All you need to do is providing your own values for `IPSEC_PSK`, `VPN_USER` and `VPN_PASSWORD`, and let them handle the rest.
|
||||
|
||||
We will use <a href="https://libreswan.org/" target="_blank">Libreswan</a> as the IPsec server, and <a href="https://www.xelerance.com/services/software/xl2tpd/" target="_blank">xl2tpd</a> as the L2TP provider.
|
||||
|
||||
@ -32,13 +32,13 @@ View my profile on LinkedIn at <a href="https://www.linkedin.com/in/linsongui" t
|
||||
- Can be directly used as "user-data" for a new Amazon EC2 instance
|
||||
- Automatically determines public IP and private IP of server
|
||||
- Includes basic IPTables rules and `sysctl.conf` settings
|
||||
- Tested with Ubuntu 14.04 & 12.04, Debian 8 and CentOS 6 & 7
|
||||
- Tested with Ubuntu 16.04/14.04/12.04, Debian 8 and CentOS 6 & 7
|
||||
|
||||
## Requirements
|
||||
|
||||
A newly created <a href="https://aws.amazon.com/ec2/" target="_blank">Amazon EC2</a> instance, using these AMIs: (See <a href="https://blog.ls20.com/ipsec-l2tp-vpn-auto-setup-for-ubuntu-12-04-on-amazon-ec2/#vpnsetup" target="_blank">instructions</a>)
|
||||
- <a href="http://cloud-images.ubuntu.com/trusty/current/" target="_blank">Ubuntu 14.04 (Trusty)</a> or <a href="http://cloud-images.ubuntu.com/precise/current/" target="_blank">12.04 (Precise)</a>
|
||||
- <a href="https://wiki.debian.org/Cloud/AmazonEC2Image/Jessie" target="_blank">Debian 8 (Jessie) EC2 Images</a>
|
||||
- <a href="https://cloud-images.ubuntu.com/locator/" target="_blank">Ubuntu 16.04 (Xenial), 14.04 (Trusty) or 12.04 (Precise)</a>
|
||||
- <a href="https://wiki.debian.org/Cloud/AmazonEC2Image" target="_blank">Debian 8 (Jessie) EC2 Images</a>
|
||||
- <a href="https://aws.amazon.com/marketplace/pp/B00O7WM7QW" target="_blank">CentOS 7 (x86_64) with Updates HVM</a>
|
||||
- <a href="https://aws.amazon.com/marketplace/pp/B00NQAYLWO" target="_blank">CentOS 6 (x86_64) with Updates HVM</a>
|
||||
|
||||
@ -46,7 +46,7 @@ A newly created <a href="https://aws.amazon.com/ec2/" target="_blank">Amazon EC2
|
||||
|
||||
A dedicated server or KVM/Xen-based Virtual Private Server (VPS), with the following OS:
|
||||
(Note: Starting with a freshly installed system is recommended)
|
||||
- Ubuntu 14.04 (Trusty) or 12.04 (Precise)
|
||||
- Ubuntu 16.04 (Xenial), 14.04 (Trusty) or 12.04 (Precise)
|
||||
- Debian 8 (Jessie)
|
||||
- Debian 7 (Wheezy) » Not recommended. Requires <a href="https://gist.github.com/hwdsl2/5a769b2c4436cdf02a90" target="_blank">this workaround</a> to work.
|
||||
- CentOS / Red Hat Enterprise Linux (RHEL) 6 or 7
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script for automatic configuration of IPsec/L2TP VPN server on Ubuntu 14.04/12.04 and Debian 8.
|
||||
# Script for automatic setup of an IPsec/L2TP VPN server on Ubuntu LTS and Debian 8.
|
||||
# Works on dedicated servers and any KVM- or Xen-based Virtual Private Server (VPS).
|
||||
# It can also be used as Amazon EC2 "user-data" with the official Ubuntu or Debian AMIs.
|
||||
#
|
||||
@ -124,6 +124,10 @@ wget -t 3 -T 30 -nv -O "$SWAN_FILE" "$SWAN_URL"
|
||||
/bin/rm -rf "/opt/src/libreswan-$SWAN_VER"
|
||||
tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE"
|
||||
cd "libreswan-$SWAN_VER" || { echo "Failed to enter Libreswan source dir. Aborting."; exit 1; }
|
||||
# Workaround for Libreswan compile issues
|
||||
cat > Makefile.inc.local <<EOF
|
||||
WERROR_CFLAGS =
|
||||
EOF
|
||||
make programs && make install
|
||||
|
||||
# Check if Libreswan install was successful
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script for automatic configuration of IPsec/L2TP VPN server on 64-bit CentOS/RHEL 6 & 7.
|
||||
# Script for automatic setup of an IPsec/L2TP VPN server on 64-bit CentOS/RHEL 6 & 7.
|
||||
# Works on dedicated servers and any KVM- or Xen-based Virtual Private Server (VPS).
|
||||
# It can also be used as Amazon EC2 "user-data" with the official CentOS 6 & 7 AMIs.
|
||||
#
|
||||
@ -164,6 +164,10 @@ wget -t 3 -T 30 -nv -O "$SWAN_FILE" "$SWAN_URL"
|
||||
/bin/rm -rf "/opt/src/libreswan-$SWAN_VER"
|
||||
tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE"
|
||||
cd "libreswan-$SWAN_VER" || { echo "Failed to enter Libreswan source dir. Aborting."; exit 1; }
|
||||
# Workaround for Libreswan compile issues
|
||||
cat > Makefile.inc.local <<EOF
|
||||
WERROR_CFLAGS =
|
||||
EOF
|
||||
make programs && make install
|
||||
|
||||
# Check if Libreswan install was successful
|
||||
|
@ -106,6 +106,10 @@ wget -t 3 -T 30 -nv -O "$SWAN_FILE" "$SWAN_URL"
|
||||
/bin/rm -rf "/opt/src/libreswan-$SWAN_VER"
|
||||
tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE"
|
||||
cd "libreswan-$SWAN_VER" || { echo "Failed to enter Libreswan source dir. Aborting."; exit 1; }
|
||||
# Workaround for Libreswan compile issues
|
||||
cat > Makefile.inc.local <<EOF
|
||||
WERROR_CFLAGS =
|
||||
EOF
|
||||
make programs && make install
|
||||
|
||||
# Restart IPsec service
|
||||
|
@ -131,6 +131,10 @@ wget -t 3 -T 30 -nv -O "$SWAN_FILE" "$SWAN_URL"
|
||||
/bin/rm -rf "/opt/src/libreswan-$SWAN_VER"
|
||||
tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE"
|
||||
cd "libreswan-$SWAN_VER" || { echo "Failed to enter Libreswan source dir. Aborting."; exit 1; }
|
||||
# Workaround for Libreswan compile issues
|
||||
cat > Makefile.inc.local <<EOF
|
||||
WERROR_CFLAGS =
|
||||
EOF
|
||||
make programs && make install
|
||||
|
||||
# Restore SELinux contexts
|
||||
|
Loading…
Reference in New Issue
Block a user