2

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.

2 Answers 2

5

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).

2
  • I want to try this, is there anyway to return to the default routing table if I mess something up?
    – Arya
    Oct 18, 2012 at 2:31
  • 1
    @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, 2012 at 3:04
0

Go into the VPN Properties window, Networking tab, select 'Internet Protocol Version 4 (TCP/IPv4)', click 'Properties'. In Internet Protocol Version 4 (TCP/IPv4) Properties window click 'Advanced...'. Untick 'Use default gateway on remote network'. Click Ok, Ok, Ok.

1
  • Thanks, it works.But, how to set traffic to Pandora/Hulu going through VPN gateway?
    – Green Lei
    Apr 20, 2016 at 2:22

You must log in to answer this question.

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