mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-22 16:59:03 +01:00
parent
aefb516958
commit
2c9701d477
@ -367,15 +367,9 @@ crl-verify crl.pem
|
|||||||
tls-server
|
tls-server
|
||||||
tls-auth tls-auth.key 0" >> /etc/openvpn/server.conf
|
tls-auth tls-auth.key 0" >> /etc/openvpn/server.conf
|
||||||
# Enable net.ipv4.ip_forward for the system
|
# Enable net.ipv4.ip_forward for the system
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
sed -i '/\<net.ipv4.ip_forward\>/c\net.ipv4.ip_forward=1' /etc/sysctl.conf
|
||||||
sed -i 's|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|' /etc/sysctl.conf
|
if ! grep -q "\<net.ipv4.ip_forward\>" /etc/sysctl.conf; then
|
||||||
else
|
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
|
||||||
# CentOS 5 and 6
|
|
||||||
sed -i 's|net.ipv4.ip_forward = 0|net.ipv4.ip_forward = 1|' /etc/sysctl.conf
|
|
||||||
# CentOS 7
|
|
||||||
if ! grep -q "net.ipv4.ip_forward=1" "/etc/sysctl.conf"; then
|
|
||||||
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
# Avoid an unneeded reboot
|
# Avoid an unneeded reboot
|
||||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
Loading…
Reference in New Issue
Block a user