From 6f2efd3b59f829e5c26004db4af16df55971024f Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Thu, 2 May 2024 20:44:54 -0500 Subject: [PATCH] New Libreswan version - Use new Libreswan version 5.0. Ref: https://lists.libreswan.org/pipermail/swan-announce/2024/000058.html --- extras/ikev2onlymode.sh | 1 + vpnsetup_alpine.sh | 6 ++++-- vpnsetup_amzn.sh | 6 ++++-- vpnsetup_centos.sh | 6 ++++-- vpnsetup_ubuntu.sh | 6 ++++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/extras/ikev2onlymode.sh b/extras/ikev2onlymode.sh index 34a9382..7e5ce8b 100755 --- a/extras/ikev2onlymode.sh +++ b/extras/ikev2onlymode.sh @@ -116,6 +116,7 @@ toggle_ikev2_only() { confirm_disable_ikev2_only bigecho "Disabling IKEv2-only mode..." sed -i".old-$SYS_DT" "/ikev1-policy=/d" /etc/ipsec.conf + sed -i "/config setup/a \ ikev1-policy=accept" /etc/ipsec.conf elif [ "$ikev2_only_status" = "DISABLED" ]; then confirm_enable_ikev2_only bigecho "Enabling IKEv2-only mode..." diff --git a/vpnsetup_alpine.sh b/vpnsetup_alpine.sh index 0f4c9f9..9c52393 100755 --- a/vpnsetup_alpine.sh +++ b/vpnsetup_alpine.sh @@ -240,7 +240,7 @@ get_helper_scripts() { } get_swan_ver() { - SWAN_VER=4.15 + SWAN_VER=5.0 base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) @@ -294,12 +294,13 @@ WERROR_CFLAGS=-w -s USE_DNSSEC=false USE_DH2=true FINALNSSDIR=/etc/ipsec.d +NSSDIR=/etc/ipsec.d EOF NPROCS=$(grep -c ^processor /proc/cpuinfo) [ -z "$NPROCS" ] && NPROCS=1 ( set -x - make "-j$((NPROCS+1))" -s base >/dev/null && make -s install-base >/dev/null + make "-j$((NPROCS+1))" -s base >/dev/null 2>&1 && make -s install-base >/dev/null 2>&1 ) cd /opt/src || exit 1 /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" @@ -326,6 +327,7 @@ cat > /etc/ipsec.conf <> Makefile.inc.local @@ -323,7 +324,7 @@ EOF [ -z "$NPROCS" ] && NPROCS=1 ( set -x - make "-j$((NPROCS+1))" -s base >/dev/null && make -s install-base >/dev/null + make "-j$((NPROCS+1))" -s base >/dev/null 2>&1 && make -s install-base >/dev/null 2>&1 ) cd /opt/src || exit 1 /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" @@ -350,6 +351,7 @@ cat > /etc/ipsec.conf <> Makefile.inc.local @@ -425,7 +426,7 @@ EOF [ -z "$NPROCS" ] && NPROCS=1 ( set -x - make "-j$((NPROCS+1))" -s base >/dev/null && make -s install-base >/dev/null + make "-j$((NPROCS+1))" -s base >/dev/null 2>&1 && make -s install-base >/dev/null 2>&1 ) cd /opt/src || exit 1 /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" @@ -452,6 +453,7 @@ cat > /etc/ipsec.conf <> Makefile.inc.local @@ -376,7 +377,7 @@ EOF [ -z "$NPROCS" ] && NPROCS=1 ( set -x - make "-j$((NPROCS+1))" -s base >/dev/null && make -s install-base >/dev/null + make "-j$((NPROCS+1))" -s base >/dev/null 2>&1 && make -s install-base >/dev/null 2>&1 ) cd /opt/src || exit 1 /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" @@ -403,6 +404,7 @@ cat > /etc/ipsec.conf <