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 PPTP based VPN setup on a remote machine. This machine is a Windows 2008 R2 Datacenter edition VM.

The VPN connection does not have DHCP enabled and does not have an IPv4 default gateway.

Now with that I would like to use only in the instance of a particular protocol (say Voip or Bittorent). So if traffic originates from my machine it can use its default gateway and public internet to go out and come back. But for some instances I would like this traffic to go/come_back via VPN so from an outside perspective this traffic is not from my system (assuming that eavesdropping on VPN connection is not feasible due to encryption)

share|improve this question
    
Nowhere NEAR enough information here - more details please. –  Chopper3 Jun 29 '11 at 16:21
    
I edited and put more details, please let me know if you need some thing more. –  geoaxis Jun 29 '11 at 16:33

1 Answer 1

up vote 1 down vote accepted

Routing normally happens based on source and IP addresses, not on protocols; only very high-end equipment can perform protocol-based routing.

The most you can do without using a "real" router to handle your connection is adding some static routes to your system, based on destination address; so you will be able to make traffic directed to specific addresses pass through your VPN, while all other traffic will keep going through your default gateway (i.e. your Internet connection).

Let's say you want the traffic directed to 209.85.148.105 (one of the addresses of www.google.com) go through your VPN connection, and your VPN is a point-to-point connection having 192.168.1.47 on your side and 192.168.1.48 on the remote end; then you could issue this command to achieve the desired result:

route add 209.85.148.105 mask 255.255.255.255 192.168.1.48
share|improve this answer
1  
Thanks for the details @geoaxis and as usual @Massimo's given a great idea. I just wanted to interject with one extra idea, most VPN clients offer the option of 'split-DNS', that is sending domain-specific data over the VPN or the other way around - this may be all you really need (i.e. aaa.com goes over the VPN, everything else goes over the DG or the other way around). –  Chopper3 Jun 29 '11 at 18:17
    
@Chopper3, this (if supported) can be indeed be easier than applying static routes to IP addresses or networks; but it would of course still apply to all traffic directed to a given host. –  Massimo Jun 29 '11 at 18:57
1  
Yep, but without PBR you can't do it anyway. –  Chopper3 Jun 29 '11 at 19:03

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.