mirror of
https://github.com/hwdsl2/setup-ipsec-vpn.git
synced 2024-06-28 08:36:08 +02:00
Fix xl2tpd on CentOS 7 for Linode
- Fix xl2tpd on CentOS 7 for providers such as Linode, where kernel module "l2tp_ppp" is unavailable - Closes: #114
This commit is contained in:
parent
320e17a61d
commit
43d11fe35a
|
@ -418,6 +418,15 @@ chmod 600 /etc/ipsec.secrets* /etc/ppp/chap-secrets* /etc/ipsec.d/passwd*
|
||||||
# Apply new IPTables rules
|
# Apply new IPTables rules
|
||||||
iptables-restore < "$IPT_FILE"
|
iptables-restore < "$IPT_FILE"
|
||||||
|
|
||||||
|
# Fix xl2tpd on CentOS 7 for providers such as Linode,
|
||||||
|
# where kernel module "l2tp_ppp" is unavailable
|
||||||
|
if grep -qs "release 7" /etc/redhat-release; then
|
||||||
|
if ! modprobe -q l2tp_ppp; then
|
||||||
|
sed -i '/ExecStartPre/s/^/#/' /usr/lib/systemd/system/xl2tpd.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Restart services
|
# Restart services
|
||||||
modprobe -q pppol2tp
|
modprobe -q pppol2tp
|
||||||
mkdir -p /var/run/fail2ban
|
mkdir -p /var/run/fail2ban
|
||||||
|
|
Loading…
Reference in New Issue
Block a user