Possible Duplicate:
Blocking web sites with Windows Firewall

I want to block specific websites from being accessed from my computer without using any other software.
Is it possible to do with windows firewall?

should have been more specific... my roommate uses my laptop to view pornos. I did try blocking sites using avast antivirus....but he turn it off....so no blocking. thats why i want it to be done at system level...where he can not find and shut it off.

  • You could do this with the hosts file
    – Dave
    Jan 11, 2013 at 9:55
  • I think you can block IP address ranges using Windows Firewall, not URLs, so you can ping the website you want to block in the command prompt to get the IP address and set up a new block rule in Windows Firewall. You can also use the hosts file, as Dave mentioned - See this question.
    – amiregelz
    Jan 11, 2013 at 9:55
  • 1
    @amiregelz - This could be a dangerous thing to do, 1 IP can relate to many websites (shared hosting for example)
    – Dave
    Jan 11, 2013 at 9:57
  • @DaveRook Right, I wouldn't do that. Much better to use the hosts file as you just need to type the website's URL there.
    – amiregelz
    Jan 11, 2013 at 9:58
  • IMO, this is not what the firewall is intended for.
    – Dave
    Jan 11, 2013 at 10:40

2 Answers 2


Despite this appearing as if it is done via IE, it (apparently) does it in the firewall.

Access Internet Explorer from your computer.

Choose "Tools" at the top of the screen. Select "Internet Options" from the drop-down menu.

Click the "Content" tab in the Internet Options menu. Scroll down to the second menu option, "Content Advisor," and click. Wait for the new menu to appear.

Click "Settings" within the Content Advisor menu. When the "Supervisor Password Required" dialog box appears, enter your Windows 7 password into this field and press "Enter."

Click the "Approved Sites" tab at the top of the screen. Wait for the words "Allow This Website," along with an empty dialog, box to appear.

Enter the full URL of the site you wish to block access to in the empty dialog box under "Allow This Website." Check "Never." ("Always" is the other option.)

Click "Apply" to confirm that you are blocking access to the chosen website. Click "OK" when you get a message confirming the change has gone into effect. The website is now blocked by your Windows 7 firewall.


I would also recommend updating the hosts file instead since you can copy and paste hosts files between machines (in some situations). See C:\Windows\System32\drivers\etc


if you block IP Adresses, you will block other Webpages hosted on the same IP too.

Here is a Tutorial to edit your hostfile:


Please remember running notepad as administrator.

For blocking a website write an Entry like this: blocked.tld


You can try to configure your Router using the Open DNS Servers and use it with an account. So you can block all porn related requests. But the Setup is a little bit tricky. You have to enter the opendns DNS Servers and you have to link your external IP Address to your Account. They offer a tool for this.

If you use the hosts File Setup, make sure that the user your roommate uses don't have Administrator Permissions. Then he can't change it. Unfortunately you have to enter every porn site by your own.

If you have the skills to, i would prefer the opendns Setup.

More informations can be found here:


Not the answer you're looking for? Browse other questions tagged .