diff --git a/vpnsetup.sh b/vpnsetup.sh index e8692bc..bc5738c 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -401,8 +401,8 @@ if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then cat >> /etc/rc.local <<'EOF' # Added by hwdsl2 VPN script -service ipsec restart -service xl2tpd restart +service ipsec start +service xl2tpd start echo 1 > /proc/sys/net/ipv4/ip_forward exit 0 EOF diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index dd9fd57..dee7c98 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -371,13 +371,12 @@ fi # Start services at boot if grep -qs "release 6" /etc/redhat-release; then - for svc in iptables fail2ban ipsec xl2tpd; do - chkconfig "$svc" on - done + chkconfig iptables on + chkconfig fail2ban on else systemctl --now mask firewalld yum -y install iptables-services || exiterr2 - systemctl enable iptables fail2ban ipsec xl2tpd >/dev/null 2>&1 + systemctl enable iptables fail2ban >/dev/null 2>&1 fi if ! grep -qs "hwdsl2 VPN script" /etc/rc.local; then if [ -f /etc/rc.local ]; then