mirror of
https://github.com/hwdsl2/openvpn-install.git
synced 2026-01-11 02:46:16 +00:00
fix net.ipv4.ip_forward settings
If the `/etc/sysctl.conf` contains `net.ipv4.ip_forward_use_pmtu`
This commit is contained in:
@@ -286,8 +286,8 @@ status openvpn-status.log
|
||||
verb 3
|
||||
crl-verify crl.pem" >> /etc/openvpn/server.conf
|
||||
# Enable net.ipv4.ip_forward for the system
|
||||
sed -i '/net.ipv4.ip_forward/c\net.ipv4.ip_forward=1' /etc/sysctl.conf
|
||||
if ! grep -q "net.ipv4.ip_forward" /etc/sysctl.conf; then
|
||||
sed -i '/\<net.ipv4.ip_forward\>/c\net.ipv4.ip_forward=1' /etc/sysctl.conf
|
||||
if ! grep -q "\<net.ipv4.ip_forward\>" /etc/sysctl.conf; then
|
||||
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
|
||||
fi
|
||||
# Avoid an unneeded reboot
|
||||
|
||||
Reference in New Issue
Block a user