I am writing an application that downloads large files in the background. All clients are logged in locally, or through a VPN. When they are logged in locally, I do not want to throttle downloads. However, I would like to limit downloads to 10 KBps when the user is connected via VPN. I can differentiate between these users by IP Address range.

Since this is an AIR Application, I figure I will throttle via server-side since I can do it from either the server itself (IIS 6) or the web service (asp.net / C#).

Throttling through IIS 6 seems to work fine, but it seems like it has to be done across the entire web site. Is there anyway to do this via IP? Or will I have to rig this up in .NET?

Thanks in advance...

+1  A: 

Simple answer for IIS 6 is no. Take a look at this for a possible way to do something similar in IIS 7.


Tim Boland
+2  A: 

My first thought is this. I don't know if it would work but it would only take a few minutes to try.

Create two IIS web sites on the same server. The first site is bound to the public IP, but the second site is bound to the private IP. Both point to the same folder on the file system.

Your VPN users will be accessing via the private IP, so you can setup a "site-wide" rule on that site that will only affect VPN users. This should work for almost any IIS6 setting, including bandwidth throttling.

Worth a try, at least.

-- Edit: Tried this and it worked flawlessly.


Choose your answer because it was more creative. Wound up doing it in .NET.

Shawn Simon