Fix OpenVPN server service

This commit is contained in:
Johan 2025-06-11 07:34:42 +02:00
parent 1326629bcb
commit b846d89f36

View File

@ -110,7 +110,10 @@ fi
sed -i -e 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
systemctl start openvpn@myserver
# systemctl start openvpn@myserver
systemctl enable openvpn-server@myserver
systemctl start openvpn-server@myserver
systemctl list-units --type=service | grep openvpn
echo Settings up NAT rules...
add_iptables_rule "-t nat -A POSTROUTING -s $VPN_SUBNET.0/24 -o $NIC_NAME -j MASQUERADE"