Compare commits
2 Commits
6ca52bf0e0
...
3c7273eb62
Author | SHA1 | Date | |
---|---|---|---|
|
3c7273eb62 | ||
|
200da23776 |
@ -74,7 +74,7 @@ https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/vpnsetup.sh
|
||||
- Debian 11 或者 10
|
||||
- CentOS 7 或者 CentOS Stream 9/8
|
||||
- Rocky Linux 或者 AlmaLinux 9/8
|
||||
- Oracle Linux 8 或者 7
|
||||
- Oracle Linux 9, 8 或者 7
|
||||
- Red Hat Enterprise Linux (RHEL) 9, 8 或者 7
|
||||
- Amazon Linux 2
|
||||
- Alpine Linux 3.16 或者 3.15
|
||||
|
@ -74,7 +74,7 @@ A cloud server, virtual private server (VPS) or dedicated server, freshly instal
|
||||
- Debian 11 or 10
|
||||
- CentOS 7 or CentOS Stream 9/8
|
||||
- Rocky Linux or AlmaLinux 9/8
|
||||
- Oracle Linux 8 or 7
|
||||
- Oracle Linux 9, 8 or 7
|
||||
- Red Hat Enterprise Linux (RHEL) 9, 8 or 7
|
||||
- Amazon Linux 2
|
||||
- Alpine Linux 3.16 or 3.15
|
||||
|
@ -88,9 +88,6 @@ check_os() {
|
||||
elif grep -qs "release 9" "$rh_file"; then
|
||||
os_ver=9
|
||||
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
|
||||
os_type=amzn
|
||||
os_ver=2
|
||||
|
@ -88,9 +88,6 @@ check_os() {
|
||||
elif grep -qs "release 9" "$rh_file"; then
|
||||
os_ver=9
|
||||
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
|
||||
os_type=amzn
|
||||
os_ver=2
|
||||
|
@ -93,9 +93,6 @@ check_os() {
|
||||
elif grep -qs "release 9" "$rh_file"; then
|
||||
os_ver=9
|
||||
grep -qi stream "$rh_file" && os_ver=9s
|
||||
if [ "$os_type" = "ol" ]; then
|
||||
exiterr "Oracle Linux 9 is not supported."
|
||||
fi
|
||||
else
|
||||
cat 1>&2 <<'EOF'
|
||||
Error: This script only supports one of the following OS:
|
||||
@ -629,7 +626,9 @@ apply_gcp_mtu_fix() {
|
||||
enable_on_boot() {
|
||||
bigecho "Enabling services on boot..."
|
||||
systemctl --now mask firewalld 2>/dev/null
|
||||
if [ "$use_nft" = "1" ]; then
|
||||
if [ "$os_type$os_ver" = "ol9" ]; then
|
||||
systemctl enable nftables 2>/dev/null
|
||||
elif [ "$use_nft" = "1" ]; then
|
||||
systemctl enable nftables fail2ban 2>/dev/null
|
||||
else
|
||||
systemctl enable iptables fail2ban 2>/dev/null
|
||||
@ -743,12 +742,16 @@ vpnsetup() {
|
||||
install_vpn_pkgs_1
|
||||
install_vpn_pkgs_2
|
||||
install_vpn_pkgs_3
|
||||
install_fail2ban
|
||||
if [ "$os_type$os_ver" != "ol9" ]; then
|
||||
install_fail2ban
|
||||
fi
|
||||
get_helper_scripts
|
||||
get_libreswan
|
||||
install_libreswan
|
||||
create_vpn_config
|
||||
create_f2b_config
|
||||
if [ "$os_type$os_ver" != "ol9" ]; then
|
||||
create_f2b_config
|
||||
fi
|
||||
update_sysctl
|
||||
update_iptables
|
||||
apply_gcp_mtu_fix
|
||||
|
Loading…
Reference in New Issue
Block a user