Where is your NAT rule?
There is no NAT rule present.
Implementation
Add the following directive to the server configuration file:
push "redirect-gateway def1"
If your VPN setup is over a wireless network, where all clients and the server are on the same wireless subnet, add the local flag:
push "redirect-gateway local def1"
Pushing the redirect-gateway option to clients will cause all IP network traffic originating on client machines to pass through the OpenVPN server. The server will need to be configured to deal with this traffic somehow, such as by NATing it to the internet, or routing it through the server site's HTTP proxy.
On Linux, you could use a command such as this to NAT the VPN client traffic to the internet:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
This command assumes that the VPN subnet is 10.8.0.0/24 (taken from the server directive in the OpenVPN server configuration) and that the local ethernet interface is eth0.
where is the source of this ?
I could not see this in the man page or anywhere else in docs.
if i search for that NAT rule using a search engine the only results come from forums
ok, the result of adding this firewall rule produces the following:
i can now mask my IP on the client which reveals the IP of the vpn server - good.
i can therefore request internet resources - good
but, when making dns queries from the client, and tracing from the server, the IP of the server (its LAN IP, not the openvpn virtual subnet IP) makes the dns query back to the mobile broadband provider's default dns servers - bad.
why is this ?
i need to make dns requests from clients go to the openvpn server which is setup using unbound and dnscrypt - which rules achieve that ?