Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 (one of the addresses of go through your VPN connection, and your VPN is a point-to-point connection having on your side and on the remote end; then you could issue this command to achieve the desired result:

route add mask
share|improve this answer
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. 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
Yep, but without PBR you can't do it anyway. – Chopper3 Jun 29 '11 at 19:03

Your Answer


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.