Wednesday, March 5, 2008

How to block an IP using IIS

To block an IP completely from all websites:

* Right click on Web Sites, select Properties
- In the "Directory Security" tab, click the "Edit" button in the "IP addresses and domain name restrictions" section
- Click on the "Add" button and enter the IP you want to block, then click "OK"
- Click "OK" to exit "IP addresses and domain name restrictions"
- Click "OK" to exit "Web Sites Properties"
- Right click "Internet Information Services", hover over "All Tasks", then select "Restart IIS"
- The offending IP is now completely blocked from accessing any of your websites

To block an IP from just 1 site:

* Right click on Web Sites, select Properties
- In the "Directory Security" tab, click the "Edit" button in the "IP addresses and domain name restrictions" section
- Click the "Add" button and enter the IP you want to block, then click "OK"
- Click "OK" to exit "IP addresses and domain name restrictions"
- Click "OK" to exit "Web Sites Properties"
- Right click on "Internet Information Services", hover over "All Tasks", then click "Restart IIS"
- The offending IP is now completely blocked from accessing this particular site.

No comments: