Forum
Computers
Articles
Operating Systems
Social Networks
Internet
Technology News
Books
Games
Product Reviews
Practice Tests
|
New Member FAQ
|
Bookmarks
|
HTML 5 Tutorials
|
Lobby
|
Members
|
Revenue Sharing
|
New Posts
|
Resources
»
Software & Programming
»
Microsoft Software
»
IIS & Web hosting
How to block Ip addresses on IIS 7.0
Posted Date:
07-Dec-2011
Category:
IIS & Web hosting
Rating:
Author:
Tony John
Member Level:
Diamond
Points
: 50
Are you a webmaster trying to block certain Ip addresses from abusing your websites? You can block a range of Ip addresses from accessing your websites by blocking them on IIS 7.0. Read more to find how to block a range of Ip address through IIS.
Today I found our websites are loading very slow and sometimes it even times out. I spent sometime going through the logs and finally figured out some automated bots were accessing certain non existing urls at very high frequency. We use "index.aspx" as our default file, but they were accessing the urls aindex.aspx, bindex.aspx, cindex.aspx... zindex.aspx and so on.
I have no idea what their intentions are, but this definitely slowed down our server. When a page that does not exist is accessed, we go through some logging process (which we can optionally disable) which further slows down the server.
Luckily, all these requests were coming from the same ip address. That made it bit easy to deal with. All I had to do was, block access from that Ip address to our website.
If you like to know how to block certain ip addresses from accessing your website and webservices, follow the steps below.
How to block specific Ip addresses or range of Ip addresses from accessing your website
If you are using IIS 7.0, you can easily block any Ip addresses from accessing your website. In order to do this, you must have the "Ip and Domain Restrictions" role installed on your server.
Install Ip and Domain Restrictions Server Role
To install this role, follow the steps below:
1. Go to "Control panel"
2. Open "Administrative tools"
3. Open "Server Manager"
4. Click on "Roles"
5. On the right panel, click on "Add Role Services"
6. Expand "Web Server" and below that expand "Security"
7. Select/check "IP and Domain Restrictions"
8. Click "Next"
Let the wizard complete and finish adding the service. Now open the IIS Manager. You will see an entry called "Ip Address and Domain Restrictions".
If you already have the IIS Manager open, you may need to close and re open it to see the new entry.
Block Ip Address in IIS 7.0
Double click on the icon "Ip Address and Domain Restrictions" in IIS Manager. (If you are missing the icon Ip Address and Domain Restrictions, carefully follow the steps above to add this role to IIS.)
When you double click and open the Ip Address block feature, you will see the right pane, with any Ip addresses already filtered. If no Ip addresses are already filtered, you will see a blank screen on rightside.
Look at the panel on the right. You will see 2 entries:
Add Allow Entry
Add Deny Entry
Since we want to block an ip address, choose "Add Deny Entry". In the popup dialog box, enter the specific Ip address you want to block from accessing your websites on your IIS 7.0.
If you want to block a range of Ip address, you can choose the appropriate option in the popup dialog and then choose the range with appropriate mask.
I just tried to block my own Ip address to see what happens. This is what I got:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
I did it just to confirm I can successfully block the bot that was trying to assess our urls too frequently. After I blocked the ip address, my logs confirmed the activity from that ip address stopped.
Did you like this resource? Share it with your friends and show your love!
Tweet
Share
Related Resources:
How to configure a website to use impersonation in IIS 7.0
IIS App pool crashing on startup
Read related articles:
IIS 7.0
Responses to "How to block Ip addresses on IIS 7.0"
Author:
tammy roy
07 Dec 2011
Member Level:
Bronze
Points
: 0
Mr tony John Great Knowledge you shared with us.
Feedbacks
Post Comment:
Notify me by email when others post comments to this article.
Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
No HTML formatting and links to other web sites are allowed.
This is a strictly moderated site. Absolutely no spam allowed.
Name:
Sign In
to fill automatically.
Email:
(Will not be published, but
required
to validate comment)
Type the numbers and letters shown on the left.
Next Resource:
IIS App pool crashing on startup
Previous Resource:
How to install IIS 8.0 on Windows Server 8
Return to Resources
Post New Resource
Category:
IIS & Web hosting
Post resources and
earn money
!
More Resources
IIS App pool crashing on startup
How to configure a website to use impersonation in IIS 7.0
How to change .NET Framework version on IIS without restarting
Purpose of Microsoft IIS Developer Express web server
IIS Developer Express - The Fabulous Developer's Web Server
New features in IIS 7.5
Popular Tags
Tag posting guidelines
Search Tags
(No tags found.)
Subscribe to Technology Articles by Email
Awards & Gifts
My Profile
Sign In
Register
AdSense Revenue
Online Members
srini
More...
Active Members
Today
Joseph
(13)
Krishna Chaitan...
(6)
Appel Flap
(5)
Last 7 Days
Tony John
(443)
Shivangi Varma
(349)
Mridul Sachan
(217)
more...
RSS Feeds
Resource Feeds
Forum Feeds
Job Feeds
About Us
Trademark Disclaimer
Contact Us
Copyright
Privacy Policy
Terms Of Use
Revenue Sharing sites
Advertise
Talk to
Tony John