how to route all traffic to home vpn and keep local networks

Weekly dev snapshots are available for testing.
We talk about them here. Testing features in the dev snapshot helps the features make it to stable.
Forum rules
Please report your experience with testing branch. Include what you were using and how
If there is a problem, the more info the better!
Post Reply
garifo
OpenVpn Newbie
Posts: 1
Joined: Sat Apr 14, 2012 10:09 pm

how to route all traffic to home vpn and keep local networks

Post by garifo » Mon Apr 16, 2012 2:17 am

Is there any way with open vpn where all web browsing goes through the vpn and anything within my office local network resources, websites, etc are still available?

Currently when I connect to VPN all the traffic goes through my home network and any resources within my company office are not available. I wanted to route all web browsing through my home network but still keeping all office internal sites and resources available.

I'm currently using tomatoUSB vpn tunneling and openVPN.
Thanks.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: how to route all traffic to home vpn and keep local netw

Post by janjust » Mon Apr 16, 2012 7:13 am

If you know the IP ranges of your office/home networks then yes you can do this.
If you want to route only "port 80 & 443" traffic via the VPN then this is , in general, not possible.

In order to redirect all traffic via the VPN except for local traffic , add something like this to the client config (or add it to the server config using "push .....":

Code: Select all

redirect-gateway def1
route <LAN1-IP> <LAN1-NETMASK> net_gateway
route <LAN2-IP> <LAN2-NETMASK> net_gateway
where <LAN-IP> and <LAN-NETMASK> are for your local network. The term 'net_gateway' is an openvpn keyword.

Post Reply