Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 2007

Blocking Web Sites in ISA Server

Scripts import blacklisted domains into ISA for inexpensive content filtering
RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    More Web Filtering

Download the Code Here

Solutions Snapshot
PROBLEM
You need to block access to thousands of unwanted Web sites without spending a lot of money.
SOLUTION
If you're already running ISA Server 2004 or 2006, you can use an inexpensive blacklist service and a couple of scripts to prevent access to inappropriate Web sites.
WHAT YOU NEED
ISA Server 2004 or 2006, blacklist service subscription, ImportBlacklist.vbs and ScheduledUpdate.bat scripts
DIFFICULTY
3 out of 5

Content-filtering products such as those from Websense and SurfControl are wonderful for regulating your users' access to undesirable Web sites, but they aren't cheap. If you have Microsoft ISA Server 2004 or ISA Server 2006, you can use it and a blacklisting service to block access to off-limits sites.

Blacklisting services maintain lists of Web sites that contain pornography, hate speech, violence, hacking tools, or other prohibited content. You can subscribe to an inexpensive blacklisting service and import its list (typically updated each week) into ISA Server with a script. In fact, I've included a free script for doing this with this article. This might sound complicated, but don't worry, it's not hard to do. Let's walk through the steps together.

Step 1: Use ISA Server
Of course, you must have ISA Server 2004 or 2006, and your users' Web browsers must be configured to go through it for HTTP access to the Internet. This article assumes you've already got this set up, but if you don't, you can download a trial version of ISA Server from http://www.microsoft.com/isaserver. If you have Microsoft Windows Small Business Server (SBS) 2003 Premium Edition Service Pack 1 (SP1) or SBS 2003 Premium Release 2 (R2), it includes ISA Server 2004.

Step 2: Create a Domain Name Set
In ISA Server, you can use firewall policy rules to grant or deny access to a domain name set—that is, a list of DNS domains. The list can include a mixture of fully qualified domain names (e.g., www.windowsitpro.com) and domains with wildcards (e.g., *.microsoft.com). We need to create a domain name set to hold the hundreds of thousands of domains we wish to block. Let's call it Bad-Sites.

To create the Bad-Sites domain name set, open the Microsoft Management Console (MMC) ISA Server Management snap-in, expand the container list under your ISA Server, and click the Firewall Policy container to highlight it. Next, right-click the Firewall Policy container, select View, and select Task Pane (if it's not already selected). The task pane will appear on the right. In the task pane, click the Toolbox tab, then click the Network Objects category. Right-click Domain Name Sets and select New Domain Name Set. Enter the name Bad-Sites and click OK. At the top of the console window, click Apply to save the changes. Figure 1 shows the Bad-Sites domain name set on the Toolbox tab. The Bad-Sites list is currently empty, but we'll fill it with blacklisted domains in a moment.

Step 3: Create a Blocking Rule
Once you have your Bad-Sites list of unwanted domains, you'll block access to those sites with a rule in the firewall policy. This rule will come just before the rule that otherwise allows Internet access, which I'll assume already exists.

To create the rule that blocks requests to Bad-Sites, click the rule in your firewall policy that permits your users Internet access. Next, right-click the Firewall Policy container in the ISA Server Management console, select New, Access Rule, name the rule Site_Blocker, click Next, select Deny, click Next, accept the default for the rule to apply to all outbound traffic, and click Next. Click Add and add the Internal Network to the list of sources (expand the Networks folder to see the Internal Network object), click Next. Click Add and add the Bad-Sites domain name set for the destination (expand the Domain Name Sets folder to see the BadSites object), click Next. Accept the default All Users option, click Next, and click Finish.

Right-click your new Site_Blocker rule to move it up or down, if necessary, to place it just above your rule that allows users Internet access. Click Apply at the top of the console to save your changes. You can see the completed Site_Blocker rule in Figure 1, including the Bad-Sites set in the To column.

See “More Web Filtering” for guidance on blocking certain file types and using other ISA Server content-filtering features.

Step 4: Download a Blacklist
You now have a rule named Site_Blocker that prevents access to domains in the currently empty Bad-Sites list. This list must now be filled with the hundreds of thousands of domains that have undesirable content, and it must be updated at least weekly. But where can you get this information in a usable form? And how can you load it into your list?

Fortunately, free and inexpensive sources of blacklists are available on the Internet that can be imported into your Bad-Sites list. Perhaps the best known free blacklists are for the squidGuard (http://www.squidguard.org/blacklist) and DansGuardian (http://www.dansguardian.org) UNIX/Linux filters, but these blacklists work just fine with ISA Server too.

I prefer the inexpensive blacklist service at http://www.urlblacklist.com. As of this writing, a business can download an updated blacklist once per week for less than $190 a year with no per-user limits. Schools and individuals pay less. Because URLBlacklist.com is a commercial rather than free service, its blacklists are managed better and the service is more likely to still exist a year from now. You can download a small demo blacklist for free to try out the service.

When you download one of these blacklists, it will most likely be in a GNU zip (gzip)–compressed .tar file—that is, a file that ends with the .tar.gz extension. You can use graphical programs such as WinZip (http://www.winzip.com) to extract your blacklist text files, or you can get Windows versions of gunzip.exe and tar.exe for free from http://unxutils.sourceforge.net (notice that unxutils has only one i) or in the free Microsoft Windows Services for Unix (SFU) at http://www.microsoft.com/technet/interopmigration/unix/sfu.

To use gunzip.exe and tar.exe with the bigblacklist.tar.gz file downloaded from http://www.urlblacklist.com, move bigblacklist.tar.gz into a new folder and execute the following commands in a CMD shell to extract the blacklist files:

gunzip.exe bigblacklist.tar.gz
tar.exe -xf bigblacklist.tar

These commands will create a new folder that contains all the blacklist files. The files are placed into subfolders named after their contents. For example, one of these subfolders will be named porn, and in the porn folder you'll find a large text file named domains.

We'll use a script to import the porn domains text file into our blocked Bad-Sites list. Then, we'll use another script to automate downloading blacklist updates and importing them into Bad-Sites.

   Previous  [1]  2  Next 


Reader Comments
You can also download a free TAR for Windows from http://gnuwin32.sourceforge.net/packages/tar.htm

And free GZIP and GUNZIP for Windows from http://www.gzip.org

PentonReader January 10, 2007 (Article Rating: )


Where is the file for this document? 94079.zip

I've looked every where.


lbueno AT domitek.net

lbueno February 12, 2007 (Article Rating: )


Where is file (94079.zip)
I find this file every where on this page
why i can not found this link
please show link in place easy i can found

tanakalee March 12, 2007 (Article Rating: )


Where is file 94079.zip

ragtop19 March 12, 2007 (Article Rating: )


Yes, I subscribe to the magazine and it points me here to download the script but it's nowhere in sight...

sysgo March 16, 2007 (Article Rating: )


Here's how to find the zip file - go to "Keyword Search" at the top of the page and enter the file name 94079.zip instead.

sysgo March 16, 2007 (Article Rating: )


http://www.windowsitpro.com/Files/94079/94079.zip

rpos06 March 27, 2007 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Accessing Database Data with ADO

...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...


Security Whitepapers Protecting (You and) Your Data with Exchange Server 2007

Extended Validation SSL Certificates

Unauthorized applications: Taking back control

Related Events Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing