2

Not sure if this is possible but hopefully someone knows... I connect to a VPN to gain access to multiple web servers via FTP. The VPN is over a sluggish line and refreshing pages in the browser every few minutes is time consuming. Can I route FTP traffic through the VPN, but web traffic and e-mail etc through the local connection? I'm on Windows 7 Home Premium. PC is connected via ethernet to router. I have a wireless adapter too if I can use that and two routers, both wireless but only one internet connection. Can go through VPN via one router, and local internet over the other router maybe?

2 Answers 2

1

Your vpn server gives you a local IP like 192.168.1.x. All you need to do is to create a static route to route this network (192.168.1.0 in the case above) to the adapter connected to the vpn and let the default route pointing to the gateway on the local connection (as when you're not connected to the vpn).

Not sure about other VPN servers but on openvpn you can configure the server to send the needed static route automatically to the client and to not redirect the default gateway to the VPN by removing (commenting) the line redirecting the gateway like this ;push "redirect-gateway"

To add static routes:

route ADD network MASK subnet_mask gateway ip

for example:

route ADD 192.168.1.0 MASK 255.255.255.0 192.168.1.1

Where 192.168.1.1 is the vpn server IP (inside the VPN - not the public one you use to connect)

3
  • When I'm connected to the VPN, my IP (this time) is "192.168.11.67". My IP for the local network is always "10.0.0.103", gateway "10.0.0.1". My other router is at "192.168.254.1". Unfortunately I have no access to the VPN server (approx 400 miles away) and they won't change anything so I need to do something locally if possible. I've seen something about static routes on the router... is that what you mean? Or static routes on the VPN server?
    – superjaz1
    Commented Jan 31, 2012 at 19:19
  • I mean static routes on your own machine. This way your machine will direct all 192.168.11.0/255.255.255.0 to the VPN server and all other trafic to your 10.0.0.1 normal gateway. Just commented the case on changing server config if you were controlling it because it is easier. The only thing you need to discover is the 192.168.11 network gateway IP or you add the route to the adapter connected to the VPN instead of the gateway (I don't remember how to do it in windows but should not be hard)
    – laurent
    Commented Jan 31, 2012 at 19:30
  • You can also add the static routes on the router if you prefer or if you have many machines connecting to the VPN as you would need to configure only the router instead of each machine.
    – laurent
    Commented Jan 31, 2012 at 19:33
1

It is very hard to understand exactly what you are asking, and without knowing a lot more specifics (IP addresses/sites), it is impossible to give you a guide on how to do this.

That being said, to prod you in the right direction, you need to look at manually editing routes and when you are connected to the VPN, you just need to route some addresses to go via your other network.

1
  • Thanks William. I can't give specific IP addresses due to client confidentiality sorry. I've tried unticking "Use default gateway on remote network" but of course then I'm connected to the VPN but everything including web and FTP routes via my network and then I'm blocked from their firewall for FTP I guess because I haven't been provided with a local IP on their network from their DHCP? Can you tell me where I would edit the "routes" please?
    – superjaz1
    Commented Jan 31, 2012 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .