dezuzel wrote
Hi all,
I have configured my router as a OpenVPN client to route all traffic through my OpenVPN server. This works fine.
However, I would like to be able to include or exclude source IP addresses on my router's network, to instead of being routed through the OpenVPN server, to bypass the OpenVPN routing altogether and access the internet directly.
Example:
192.168.1.120 Has all traffic routed through OpenVPN.
192.168.1.121 Has all traffic sent 'directly' ignoring OpenVPN.
Is there any way to do this by changing configuration on the router or OpenVPN server? I was wondering if this is possible with iptables maybe?
If anyone could help me out or point me in the right direction it would be grealty appreciated.
you can get the job done by adding two line into your openvpn client so it will works as you like
this line tell openvpn client add routing table so ip 192.168.1.120 go over vpn server
route 192.168.1.120 255.255.255.0 vpn_gateway
this line tell openvpn client add routing table so ip 192.168.1.120 go local internet not over vpn server
route 192.168.1.121 255.255.255.0 net_gateway
basic just adding route with vpn_gateway or net_gateway so it can do what ever you want.