mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-23 21:46:08 +03:00
Switch from /etc/sysctl.conf to systemd-sysctl
This commit is contained in:
parent
6061a29028
commit
b3953963ba
@ -154,6 +154,7 @@ if [[ -e /etc/openvpn/server.conf ]]; then
|
|||||||
yum remove openvpn -y
|
yum remove openvpn -y
|
||||||
fi
|
fi
|
||||||
rm -rf /etc/openvpn
|
rm -rf /etc/openvpn
|
||||||
|
rm -f /etc/sysctl.d/30-openvpn-forward.conf
|
||||||
echo
|
echo
|
||||||
echo "OpenVPN removed!"
|
echo "OpenVPN removed!"
|
||||||
else
|
else
|
||||||
@ -304,11 +305,8 @@ status openvpn-status.log
|
|||||||
verb 3
|
verb 3
|
||||||
crl-verify crl.pem" >> /etc/openvpn/server.conf
|
crl-verify crl.pem" >> /etc/openvpn/server.conf
|
||||||
# Enable net.ipv4.ip_forward for the system
|
# Enable net.ipv4.ip_forward for the system
|
||||||
sed -i '/\<net.ipv4.ip_forward\>/c\net.ipv4.ip_forward=1' /etc/sysctl.conf
|
echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/30-openvpn-forward.conf
|
||||||
if ! grep -q "\<net.ipv4.ip_forward\>" /etc/sysctl.conf; then
|
# Enable without waiting for a reboot or service restart
|
||||||
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
|
|
||||||
fi
|
|
||||||
# Avoid an unneeded reboot
|
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
if pgrep firewalld; then
|
if pgrep firewalld; then
|
||||||
# Using both permanent and not permanent rules to avoid a firewalld
|
# Using both permanent and not permanent rules to avoid a firewalld
|
||||||
|
Loading…
Reference in New Issue
Block a user