Stop forwarding when removing vpn

This commit is contained in:
Bob Mottram 2017-09-25 19:06:00 +01:00
parent 00d1e643c6
commit 5ec792bcd6
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,10 @@ function remove_vpn {
rm -rf /etc/openvpn rm -rf /etc/openvpn
fi fi
firewall_disable_vpn firewall_disable_vpn
echo 0 > /proc/sys/net/ipv4/ip_forward
sed -i 's|net.ipv4.ip_forward=.*|net.ipv4.ip_forward=0|g' /etc/sysctl.conf
remove_completion_param install_vpn remove_completion_param install_vpn
# remove any client keys # remove any client keys