Page 1 of 1

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

Posted: Mon Apr 16, 2012 2:17 am
by garifo
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.

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

Posted: Mon Apr 16, 2012 7:13 am
by janjust
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.