I have OpenVPN installed on OMV 2.2 (raspberry pi) and it is working fine in that VPN clients can connect and access computers on the VPN server network.
However, I have an issue where clients can't access the internet when connected via VPN. I have worked out what is causing the issue but I need some help to resolve.
When the OMV server starts, a number of entries are added as POSTROUTING rules/settings to iptables but I don't know where some of these entries are being added/set from.
The entries in iptables causing the issue are 3x SNAT entries in the POSTROUTING section that are setup on the VPN address (10.8.0.0/24) to everywhere as destination but with comment/note 'to:[ip of OMV server].
The 2 steps below resolve the issue and the VPN works just how I intended. Clients can access computers on the VPN server network and also access the internet when connected via VPN.
If I flush iptables with the command:
iptables -F -t nat
Then add the following route to setup the main POSTROUTING rule:
iptables -t nat -A POSTROUTING -a 10.8.0.0/24 -o eth0 -j MASQUERADE
My question is how can I track down where the SNAT entries in iptables are coming from?
Many thanks in advance.