1
0
mirror of synced 2024-11-24 05:46:09 +03:00

Compare commits

..

No commits in common. "3c7273eb62106374585227623b78c8aea0c676ea" and "6ca52bf0e04e7cef0537470dbf34b0eb216b2ecb" have entirely different histories.

5 changed files with 14 additions and 11 deletions

View File

@ -74,7 +74,7 @@ https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh
- Debian 11 或者 10 - Debian 11 或者 10
- CentOS 7 或者 CentOS Stream 9/8 - CentOS 7 或者 CentOS Stream 9/8
- Rocky Linux 或者 AlmaLinux 9/8 - Rocky Linux 或者 AlmaLinux 9/8
- Oracle Linux 9, 8 或者 7 - Oracle Linux 8 或者 7
- Red Hat Enterprise Linux (RHEL) 9, 8 或者 7 - Red Hat Enterprise Linux (RHEL) 9, 8 或者 7
- Amazon Linux 2 - Amazon Linux 2
- Alpine Linux 3.16 或者 3.15 - Alpine Linux 3.16 或者 3.15

View File

@ -74,7 +74,7 @@ A cloud server, virtual private server (VPS) or dedicated server, freshly instal
- Debian 11 or 10 - Debian 11 or 10
- CentOS 7 or CentOS Stream 9/8 - CentOS 7 or CentOS Stream 9/8
- Rocky Linux or AlmaLinux 9/8 - Rocky Linux or AlmaLinux 9/8
- Oracle Linux 9, 8 or 7 - Oracle Linux 8 or 7
- Red Hat Enterprise Linux (RHEL) 9, 8 or 7 - Red Hat Enterprise Linux (RHEL) 9, 8 or 7
- Amazon Linux 2 - Amazon Linux 2
- Alpine Linux 3.16 or 3.15 - Alpine Linux 3.16 or 3.15

View File

@ -88,6 +88,9 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then elif grep -qs "release 9" "$rh_file"; then
os_ver=9 os_ver=9
grep -qi stream "$rh_file" && os_ver=9s grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn os_type=amzn
os_ver=2 os_ver=2

View File

@ -88,6 +88,9 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then elif grep -qs "release 9" "$rh_file"; then
os_ver=9 os_ver=9
grep -qi stream "$rh_file" && os_ver=9s grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn os_type=amzn
os_ver=2 os_ver=2

View File

@ -93,6 +93,9 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then elif grep -qs "release 9" "$rh_file"; then
os_ver=9 os_ver=9
grep -qi stream "$rh_file" && os_ver=9s grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
else else
cat 1>&2 <<'EOF' cat 1>&2 <<'EOF'
Error: This script only supports one of the following OS: Error: This script only supports one of the following OS:
@ -626,9 +629,7 @@ apply_gcp_mtu_fix() {
enable_on_boot() { enable_on_boot() {
bigecho "Enabling services on boot..." bigecho "Enabling services on boot..."
systemctl --now mask firewalld 2>/dev/null systemctl --now mask firewalld 2>/dev/null
if [ "$os_type$os_ver" = "ol9" ]; then if [ "$use_nft" = "1" ]; then
systemctl enable nftables 2>/dev/null
elif [ "$use_nft" = "1" ]; then
systemctl enable nftables fail2ban 2>/dev/null systemctl enable nftables fail2ban 2>/dev/null
else else
systemctl enable iptables fail2ban 2>/dev/null systemctl enable iptables fail2ban 2>/dev/null
@ -742,16 +743,12 @@ vpnsetup() {
install_vpn_pkgs_1 install_vpn_pkgs_1
install_vpn_pkgs_2 install_vpn_pkgs_2
install_vpn_pkgs_3 install_vpn_pkgs_3
if [ "$os_type$os_ver" != "ol9" ]; then install_fail2ban
install_fail2ban
fi
get_helper_scripts get_helper_scripts
get_libreswan get_libreswan
install_libreswan install_libreswan
create_vpn_config create_vpn_config
if [ "$os_type$os_ver" != "ol9" ]; then create_f2b_config
create_f2b_config
fi
update_sysctl update_sysctl
update_iptables update_iptables
apply_gcp_mtu_fix apply_gcp_mtu_fix