Openvpn – How to set OpenVPN client to force traffic through VPN Server

openvpnvpn

The OpenVPN client and server are setup and run very well. However, the network traffic goes from client to VPN Server only for internal traffic (e.g. *.mydomain.com)

I have heard some setting on the server site that enable/disable all traffic or just internal traffic (otherwise the common network e.g. google.com will go through its existing network as of no VPN connection)

Is there any setting I can change on the client side to accomplish that as well?

Best Answer

Note entirely sure that this is what you are looking for, but you can force all client traffic through the VPN by setting the redirect-gateway def1-parameter.

Pushing the redirect-gateway option to clients will cause all IP network traffic originating on client machines to pass through the OpenVPN server.

More information in the official how to: https://openvpn.net/index.php/open-source/documentation/howto.html#redirect