There are cases, where you might want to use OpenVPN to redirect only a fraction of traffic, but not all. By default, after you connect to OpenVPN, server would push the call 'redirect-gateway'
to the client to make the client divert all the traffic through tun
network.
This behavior can be override with the following command line argument:
--pull-filter ignore redirect-gateway
You can add it in the openvpn command line as following:
openvpn --pull-filter ignore redirect-gateway --config "your_file.ovpn"
Once this is done, remember that, you have to route the targetted traffic using either the route
command or 'ip route'
command, otherwise no traffic will route through your openvpn tunnel network.