Daniel S
I'm currently using push "redirect-gateway def1" to one of my roadwarriors and it works fine except for OpenVPN not routing traffic through (but outside) VPN when using the server's WAN IP address. Using VPN IP works fine.
i.e
If I'm accessing my openvpn server's webpage by using WAN IP, traffic goes through Internet and my client's WAN IP is logged.
How can I force all traffic through VPN even if it's the OpenVPN's WAN IP? This is necessary especially since I need to connect to my SMTP server (which most of ISP's around here have already blocked), and I'd like to use my WAN IP/hostname as SMTP server.
janjust
in short: you can't . the openvpn client needs a direct route (i.e. outside of the tunnel) to the public IP of the VPN server, in order to send the encrypted traffic. If traffic to the public IP of the VPN server would also flow through the tunnel then you'd be baiting your own tail.
With some iptables magic (on the *client* side) you might be able to force all non-VPN traffic (i.e. match on anything other than UDP+port 1194) through the tunnel. For Windows clients this is much harder , if not impossible, to achieve without some third-party software .
Daniel S
Ah, I see. I thought only UDP 1194 would establish connection and redirect every other port/protocol through VPN link. It's an android device so I guess my options are a bit limited. Thanks anyways, though.