Limit Connections Per IP Windows 2008 R2 x64
For IIS at least one option is Dynamic IP Restrictions which is a supported addon for IIS 7 from Microsoft. It's features include:
Dynamically blocking of requests from IP address based on either of the following criteria:
- The number of concurrent requests.
- The number of requests over a period of time.
It can be installed with the Web Platform Installer and integrates fully with IIS 7.0 Manager.
For other services/ports it is usually better to also use a solution or technique specific to it. A common one is banning an ipaddress for a while after several failed login attempts within a short period of time (like denyhosts or fail2ban on Linux/Unix systems) for services like SSH and RDP. An example for Windows would be ts_block which does it for Terminal Server connections.