Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know how to use hotspot shield or private VPN to use Pandora/Hulu outside of US. However, those VPN solutions route all traffic through VPN gateway. So even browsing a local site, the routing path is going through gateway in US, then back to my local destination site. How can I configure Windows 7 routing table to set traffic to Pandora/Hulu going through VPN gateway, where other traffic just use the original internet connection? I know in Windows Command Line Prompt, there is a tool - route which seems like it. But I don't know how to use it.

The other question is how to figure out what IP/subnet is related to Pandora/Hulu? I guess nslookup www.hulu.com is not sufficient since there may be some other host with different hostname belongs to hulu.

share|improve this question

migrated from serverfault.com Oct 28 '11 at 9:25

This question came from our site for professional system and network administrators.

add comment

1 Answer

up vote 4 down vote accepted

Yes, the first step is to identify the IP addresses you want to route - the actual routing is fairly straightforward.

When you are connected to the VPN and do

route print

It will show a default route, something like:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
      0.0.0.0          0.0.0.0        192.168.1.1     192.168.1.2     20

The IP address of the gateway and interface will be provided by your VPN provider at connection time.

The 0.0.0.0 destination and 0.0.0.0 netmask means "match all traffic to this route, and send it to the gateway"

You want to delete this, and replace it with a default route that is out of your internet connection. Like this (assuming 10.1.1.1 was your own router):

route delete 0.0.0.0 mask 0.0.0.0 192.168.1.1
route add 0.0.0.0 mask 0.0.0.0 10.1.1.1

Now all traffic will go out of your router, and none through the VPN.

Then you figure out the hulu network range - lets say it is 200.200.200.0/24, and add a route for it:

route add 200.200.200.0 mask 255.255.255.0 192.168.1.1

So what this is saying is, any traffic destined for any address in the range 200.200.200.0-255 should be sent to the VPN gateway.

Determining the hulu range might be difficult to deduce, but you could do some googling as you won't be the first to try and figure out what ranges they use. Failing that, you could install wireshark and observe what traffic flows through the VPN when accessing hulu (you'll want to make sure you don't run anything else at the same time).

share|improve this answer
    
I want to try this, is there anyway to return to the default routing table if I mess something up? –  Arya Oct 18 '12 at 2:31
    
@Arya route print will show the current routing table, so you can just add/delete any entries to restore it. Also, unless you use the /p switch, none of the routing changes are persistant, so simply rebooting will get you back to normal. –  Paul Oct 18 '12 at 3:04
add comment

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.