asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search








Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Archive
Writers
Code Samples
Components
Tools
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Working With IIS Packet Filtering
By Brien M. Posey
Rating: 3.1 out of 5
Rate this article


  • email this article to a colleague
  • suggest an article

    Introduction

    If you host a Web site, you've most likely run into situations where someone attempted to modify your site, force it to crash, or tried to access unauthorized pages. One of the most effective ways of dealing with these situations is to log them and then block hackers' access by preventing their IP addresses from passing through your company's firewall. However, while I've always been a strong advocate of firewall security, Internet Information Services (IIS) 5.0 has its own built-in security measures for weeding out undesirables. This article will discuss ways to control access through IIS.

    IP Packet Filtering

    When someone attempts to access an IIS server, the first security check that IIS performs is an IP filter check (assuming that the user has already passed through the firewall successfully). The IP filter is designed to allow or deny access to the IIS server based on IP address or domain name.

    To configure IP packet filtering, open the Internet Information Services console and navigate through the console tree to the Web site that you want to control access to. Next, right click on the Web site and select the Properties command from the resulting context menu. When you do, you'll see the Web site's properties sheet. Next, select the properties sheet's Directory Security tab and click the Edit button in the tab's IP Address and Domain Name Restrictions section. When you do, you'll see the IP Address and Domain Name Restrictions dialog box shown in Figure A


    Figure A

    As you can see in the figure, if you choose to use IP filtering, you must either grant or deny access to everyone and then create exceptions to the grant or denial. For example, suppose that you had a confidential Web site that you wanted to make sure that no one had access to unless they were employees of a few carefully selected companies. In a case like this, you'd deny access to everyone and then list the domain names of the privileged few companies in the exceptions list.

    On the other hand, if you had a public Web site, you would normally grant access to everyone and then use the exceptions list to deny access to individuals or domains that you consider to be a threat. The possibilities here are endless. For example, I recently saw one company (who shall remain nameless) that used IP filtering to make sure that one of their competitors couldn't access their Web site.

    Normally, unless you want to block access to an entire domain, you're better off blocking access to individual IP addresses. For example, if a hack attempt came from the address 147.100.100.99 (this is a fictitious address), then you'd probably want to block this address rather than blocking the hacker's entire domain. Unfortunately, there's one big issue to consider when blocking an individual IP address. If someone accesses your Web site from a corporate network, then there's a really good chance that the IP address that they're using isn't their own IP address, but rather the IP address of a proxy server at their company. Blocking a proxy server's IP address denies access to anyone who might be passing through that proxy server to access your Web site. Therefore, blocking access to a proxy server's IP address has a similar effect to blocking the company's entire domain (unless the company uses multiple proxy servers).

    The other thing that you need to consider when blocking IP addresses is that if the hacker is using dial up access to the Internet, then they will almost always be using a dynamic IP address. This means that the next time that they access the Internet, their IP address will have likely changed and your block will be completely ineffective.

    If the person that you're trying to block is using a cable modem or a DSL connection, then they are probably still using a dynamic IP address. However, the IP addresses that are associated with these types of broadband connections tend to be semipermanent. Many ISPs allow broadband customers to continuously renew the lease on their IP addresses for as long as the connection exists. If the connection is dropped or the user reboots, then the user runs the risk of getting a different IP address. However, for all practical purposes, blocking the IP address of someone who's using this type of connection tends to be effective, at least for a while.

    As you can see, filtering based on IP address doesn't always work the way that you want it to. Factors such as proxy servers and dynamic IP addresses can really complicate things. Even if everyone in the world had a static IP address, there are still reasons why IP address filtering wouldn't be completely effective. For example, once blocked, a hacker could spoof someone else's IP address or just borrow a friend's computer. My point is that IP address filtering is good as a first line of defense, but it shouldn't be your only line of defense. Fortunately, there are several additional security barriers that you can configure to prevent unauthorized access to your Web server.

    Is the User Permitted?

    Assuming that IIS has been configured to allow the IP address that the user is attempting to connect from, Windows 2000 and IIS begin checking a number of other criteria. The next item on the checklist is user access control.

    User access control involves checking to see if the user in question has supplied a valid username and password. Of course the majority of Web sites don't require the user to enter a username or password, and rely on anonymous authentication instead. The only real difference between standard authentication and anonymous authentication is that standard authentication requires a user to enter a username and password. Anonymous authentication doesn't require the user to enter any sort of login credentials, but instead uses a username and password that has been supplied by the system. You can view the anonymous logon credentials by opening the Internet Services Manager and right clicking on the Web site that you want to control access to. Next, select the Properties command from the context menu. When the Web site's Properties sheet appears, select the Directory Security tab. Finally, click the Edit button in the Anonymous Access and Authentication Control section of the Directory Security tab. Doing so will reveal the Authentication Methods dialog box that allows you to enable or disable anonymous access and control which username and password should be associated with anonymous access.

    Once a user has entered their login credentials, Windows confirms the password and then checks to make sure that the login is permitted. Some examples of situations in which a correct username and password is entered, but the login isn't permitted would be cases in which the password has expired, it's outside the permitted time of day, or the account has been disabled or locked out.

    In addition to the criteria that I just mentioned, Windows also checks to make sure that the user has access to the server via the Logon Locally or the Access This Computer From The Network permission. Normally, only members of the Administrators group have permission to Logon Locally. However, according to the Internet Information Services 5.0 Resource Guide, if WWW basic authentication or FTP is used, then IIS attempts to log the user on locally. Therefore, if you're having trouble getting users authenticated, you might check the Logon Locally permission.

    IIS Access

    So far in the validation process, IIS has screened the IP address and domain name. Windows has then validated the username, password, and login criteria. The next step in the process is for IIS to implement its own access control. The basic premise behind IIS access control is that it controls what a user is able to do once they reach the Web site in question. For example, if your Web site used the WWW service, you could assign the Read, Write, Execute, or Script Action permissions to a user. For example, if you wanted visitors to your site to be able to view content, but not to make modifications, you could assign the Read permission and nothing else.

    NTFS Access

    The final part of the access-control process is the NT File System (NTFS) permissions. Remember that IIS 5.0 rides on top of Windows 2000 Server and is therefore subjected to any access-control rules imposed by Windows. For example, suppose for a moment that IIS was configured to allow anyone, including anonymous logins, to have full Read and Write permissions to the Web site. Now suppose that the directory that contained the Web site existed on an NTFS partition and that the NTFS permissions were set to give everyone Read access, but to only give Write access to administrators. When IIS and NTFS permissions contradict, the NTFS permissions are considered to be authoritative and are therefore the permissions that are used. In this particular case, it would mean that regardless of how IIS was configured, only the administrators would have Write access to the directory containing the Web site.

    The fact that NTFS permissions override IIS permissions begs the question of why you should even bother setting IIS permissions. Keep in mind that while theoretically, NTFS permissions could be used to solely control access to your Web site, IIS intends for the NTFS permissions to be the last line of defense, not the only line of defense. Many hacker utilities exist that can foil NTFS security. Therefore, if NTFS is your only line of defense and a hacker decides to use one of these utilities against your Web site, your entire site can quickly be compromised.

    There's no surefire way to keep hackers from tampering with your Web server, but using all of the available security mechanisms is a big step in the right direction. While it's true that any of the security mechanisms that I've talked about can be beaten, the more security mechanisms that you use, the tougher a hacker's job will be. Most casual hackers will move on to an easier target if they think that your Web server will be too much work to break into. Obviously, there are some hackers that aren't deterred by a little hard work, but the harder that a hacker has to work, the longer a hack will take, and the longer that the hack takes, the better your chances are of catching the hack in progress and being able to do something about it.

    Conclusion

    As you can see, IP filtering is a great tool for keeping known hackers at bay. However, IP filtering by itself isn't enough. Instead, of relying solely on IP filtering, you should make use of the other access-control mechanisms.

    About the Author

    Brien Posey is the executive vice president of research at Relevant Technologies, Inc. Brien is an MCSE and a renowned technology journalist. He was recently voted the most popular server author on CNET's TechProGuild portal. Brien can be reached at brien@brienposey.com. Due to the high volume of messages that Brien receives, it's impossible for him to respond to all of them, although he does read them all.

  • Rate This Article
    Not HelpfulMost Helpful
    1 2 3 4 5
    Other Articles
    Sep 29, 2005 - Migrating to a Load Balanced IIS 6 Environment
    Migration to IIS 6 can present itself as a daunting challenge. Depending on your existing hosting configuration, the process can number in hours, days, or even weeks. Careful planning and research is integral to achieve a successful migration.
    [Read This Article]  [Top]
    Apr 18, 2003 - IIS 6.0: Lessons in Trustworthy Computing
    Microsoft's Trustworthy Computing initiative significantly changed the way in which Microsoft builds and designs software. In this article, Jeff Gonzalez explores some of the new options and architecture in Internet Information Services 6.0.
    [Read This Article]  [Top]
    Mar 25, 2002 - Moving IIS To A Different Server - Part 2
    Brien Posey evaluates two additional methods for migrating a Web server and it settings, backup/restore and ghosting.
    [Read This Article]  [Top]
    Feb 27, 2002 - Moving Your IIS Server to a New Server - Part 1
    Upgrading your server? Brien Posey takes a look at the process and pitfalls of migrating IIS to a completely different server.
    [Read This Article]  [Top]
    Jan 23, 2002 - Troubleshooting IIS Access Problems
    Spending countless hours developing a Web site only to discover that no one can access it is frustrating. This article guides you through the process of troubleshooting Web-site access problems.
    [Read This Article]  [Top]
    Jan 18, 2002 - Running IIS on Windows XP Home Edition?
    Members of the 15Seconds discussion list may have found a way to run IIS on Windows XP Home Edition, so developers can run ASP pages. Attempt at your own risk!
    [Read This Article]  [Top]
    Oct 30, 2001 - Protecting Your IIS Server and Web Application
    Internet viruses such as Code Red and Nimbda have brought down numerous IIS Web servers recently. Fortify and defend your system with this comprehensive strategy authored by 30-year industry veteran, Andrew Novick.
    [Read This Article]  [Top]
    Oct 16, 2001 - Implementing an E-mail Content Filter Using CDO
    Stop SPAM from sliding through your e-mail system. George Walker shows how to create an e-mail content filter for the Windows 2000 SMTP service using Microsoft Collaboration Data Objects.
    [Read This Article]  [Top]
    Feb 10, 2000 - Creating Dynamic JavaScript with ASP and Databases
    Travis Giggy demonstrates how to put ASP tags inside of JavaScript blocks so developers can fit large amounts of data into one form on a single page. He offers an overview of things that can be done with dynamic JavaScript with ASP and data queries.
    [Read This Article]  [Top]
    Mar 25, 1998 - Collaboration Data Object and IIS 4.0
    Collaboration Data Object (CDO) is a COM library designed to send mail through SMTP or Microsoft Exchange. If you install the SMTP server that comes with Microsoft Option Pack 4, you can send mail from an Active Server page using CDO. Because CDO is comes with Microsoft Option Pack 4, CDO is free.
    [Read This Article]  [Top]
    Mailing List
    Want to receive email when the next article is published? Just Click Here to sign up.

    Support the Active Server Industry



    JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

    Solutions
    Whitepapers and eBooks
    Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
    Microsoft Article: 7.0, Microsoft's Lucky Version?
    Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
    Avaya Article: How to Feed Data into the Avaya Event Processor
    Microsoft Article: Install What You Need with Windows Server 2008
    HP eBook: Putting the Green into IT
    Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
    Avaya Article: Setting Up a SIP A/S Development Environment
    IBM Article: How Cool Is Your Data Center?
    Microsoft Article: Managing Virtual Machines with Microsoft System Center
    HP eBook: Storage Networking , Part 1
    Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
    MORE WHITEPAPERS, EBOOKS, AND ARTICLES
    Webcasts
    Intel Video: Are Multi-core Processors Here to Stay?
    On-Demand Webcast: Five Virtualization Trends to Watch
    HP Video: Page Cost Calculator
    Intel Video: APIs for Parallel Programming
    HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
    Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
    MORE WEBCASTS, PODCASTS, AND VIDEOS
    Downloads and eKits
    Sun Download: Solaris 8 Migration Assistant
    Sybase Download: SQL Anywhere Developer Edition
    Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
    Red Gate Download: SQL Compare Pro 6
    Iron Speed Designer Application Generator
    MORE DOWNLOADS, EKITS, AND FREE TRIALS
    Tutorials and Demos
    How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
    eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
    IBM Article: Collaborating in the High-Performance Workplace
    HP Demo: StorageWorks EVA4400
    Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
    Microsoft How-to Article: Get Going with Silverlight and Windows Live
    MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES