Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a VPN connection set up on my Windows 7 Pro machine. Currently accessing our SVN repos and bug tracking/etc sites I have to explicitly enable my VPN connection (killing my web connection). I'd like to be able to route this automatically so that when trying to access these services (on two servers accessed by hostname) it will correctly route over VPN.

Another catch-I don't want this to happen when I'm physically on the LAN these machines are on.

Any pointers? Thanks :)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I think this mostly depends on the private network your SVN and other resources are located on.

If you specify only to route traffic for that particular private subnet through the VPN, then you can maintain your web sessions and have all other traffic route out your normal internet connection instead of the VPN tunnel, which is exactly how permnanent VPN connections are routed in order to maintain their permanence.

This post speaks to your question somewhat and provides additional insight: http://superuser.com/questions/12022/how-can-i-make-the-windows-vpn-route-selective-traffic-by-destination-network

So to recap; On your VPN connection settings you need to make sure that 'Use Remote Gateway' is unchecked, because this effectively tells your local machine to send ALL traffic through the VPN tunnel and out the gateway of the remote network. The second thing you need to do is ensure routing of traffic bound for the resources in the private network gets to the other end of your VPN tunnel which will reach the resources there or can then be routed from that end-point. Some VPN clients have the ability to create these static routes automatically for you, otherwise you will need to manually enter that routing information on your local machine. As long as your local private network and the remote private network are numbered differently, you should be able to leave those routes in permanently, as opposed to what the post in the above link says.

To do this manually in Windows 7 your need know the network addresses for your local private network and the remote private network, the IP of the default gateway on the remote private network, and how to use the 'route' command in windows.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.