Thanks, but that won't work because the hosts file does not take wildcards. I would manually need to enter each host name (sub domain) and that's not really an option (there's way too many).
Main Topics
Browse All TopicsHi!
I'm sure this is possible, but just haven't figured out how...
What I want to do is block a domain and all of it's sub-domains in Windows XP. For example, I'd like to be able to block the following on outbound connections:
*.example.com.
I know I can block IP addresses and subnets on my software firewall as well as my router firewall, but need it to be host names.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There's a couple of ways to do this, one definitely better than the other:
- best way is to control this at the DNS server level. then you have the ability to redirect traffic bound for domain *.example.com to any IP that you want...
- slightly more messy way is to modify the hosts file in:
C:\Windows\system32\dri
you can follow the examples in that file to add something like
127.0.0.1 example.com
127.0.0.1 www.example.com
and so on for all of the host names for that domain.
I hope this works for you, I'll keep looking to see what else I can find.
TechNet document on Windows XP hostname resolution:
http://technet.
You may want to look at Freeproxy.
http://www.handcraftedsoft
I use it on a number of client sites and you can use it on a local pc.
You can create any number of rulesets to get it to do what you need.
Blocking sites and logging are what I mainly use it for.
Business Accounts
Answer for Membership
by: crokeefe28Posted on 2009-02-28 at 20:21:54ID: 23766866
how about editing the hosts file to say something like this:
127.0.0.1 hostname.domainname.tld
That way, when the machine attempted to resolve the host, it would loop back to itself and problem solved.