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 VPN set up with USAIP ( to get an IP in the US although being physically connected to the internet in Europe.

Now i want to route only specific requests via this VPN (you already guessed it, Hulu). Because Hulu's IPs are changing quite often, i would like to specifiy, that only traffic initiated by some applicatins (say firefox.exe) is routed thru the VPN. Can a software firewall do this (and if yes, which one do you recommend?) or what would be the best way to accomplish this?

share|improve this question
up vote 2 down vote accepted

And you'd actually need to route DNS requests as that's Akamai's first round of routing.

A much easier way is to just use SSH as a socks proxy:

ssh -D 1080 <host>

Then tell your browser there's a SOCKS proxy on and things just work.

Even for apps that don't directly support SOCKS there are wrappers like tsocks.

share|improve this answer
Perhaps you should elaborate a bit here on implementation details for the reader. – gravyface Jul 18 '09 at 13:39
Yes, this sounds like a viable way. i actually want to use the program PlayOn on windows - is there a way to use a SOCKS proxy with this program? to the other respondents, thanks, but i explicitly don't want to use routing based on the AKAMAI subnets as i would need to change my routes sometimes in the future. basing this on the application it's a set it and forget it soultion.. – perler Jul 18 '09 at 16:11

Hulu's IPs are owned by Akamai so you'd have to put in routes to all of Akamai's subnets to go through this VPN. However this would force everything from Akamai to go through the VPN. If you are ok with this then go for it. Start with as this is the subnet that the Hulu web farm is connected to.

As far as I know there's no way to tell a specific app to use a specific network connection.

share|improve this answer

Actually, this FoxyProxy add-on/how-to, plus this list of world-wide proxies, is probably a better option.

share|improve this answer

Yes, you can route based on traffic type (port, IP, protocol). This is very easy if you are familiar with Linux and policy routing under Linux. You need to basically do two things. (1) Mark or Flag your traffic using IPTABLES and (2) policy route based on the flag or mark using Linux IPROUTE2 suite of tools on most Linux distros.

You can mark traffic based on a range of subnets such as HULU's IPs or you can mark based on Port or range of ports. I don't know much about HULU beyond what it basically is. If you can mark traffic based on port(s) or IP subnet(s), then you can easily set this up using Linux as a router.

Now it may be simpler to mark traffic based on source port rather than destination port if destination ports vary too much. I believe HULU is a client that can be installed (last time I played with HULU was about 1-2 years ago). If within the HULU client you can specify the source port supposedly so you can configure your NAT or HTTP PROXY firewall to allow this traffic through, then you're in business!

share|improve this answer

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.