I should perhaps also mention I am using the stock OpenVPN sample server.conf and client.conf files with little modification except:
push “redirect-gateway def1″
push “dhcp-option DNS 10.8.0.1″
has been added to server.conf.
I understand this causes the clients to execute the appropriate route commands to direct all network traffic via the VPN. I suspect it is this code that needs tweaking but I am not sure what or how.
Also, I have added the following routing to the Server:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
AFAIK this basically routes VPN packets arriving at the server access to the internet, but has no effect on the client. Do I also need to do something with the iptables in the client machine?
Any help is greatly appreciated.
Andy