snydeopen
I have a private network setup on a cloud server with a virtual machine running openVPN on ubuntu.
The private network has a virtual router that provides outgoing-only access to the internet for machines on the private network.
Clients can connect to the machine running openVPN with no problem and perform the operations I want them to.
BUT:
When I enable push "redirect-gateway def1 bypass-dhcp" to force all client internet traffic through the VPN, the clients cannot access the internet.
IP forwarding is enabled. (net.ipv4.ip_forward=1)
I have the rule set to allow openVPN traffic to the gateway (-A POSTROUTING -s 10.8.0.0/8 -o ens3 -j MASQUERADE)
Any suggestions? Do I need to plug the IP of the virtual router in somewhere to allow openVPN to find it?
snydeopen
Followup:
Seeing from the flow chart that I likely have a firewall issue, I checked the firewall on the linux server that openVPN runs on and it was disabled.
How could it then be a problem?
Out of curiosity I enabled it.
Problem solved.
I guess between linux and the cloud management service the port I needed was blocked by default and I needed to enable the firewall where I had added a rule to allow it. Go figure.
TinCanTech
You need to enable the firewall for masquerade to work ..
snydeopen
Ah that explains it. thanks.