Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: [Help] need to block a website in windows 7

15 Apr 2012   #1
omn143

Win7 & Ubuntu
 
 
[Help] need to block a website in windows 7

Hello Brothers and sisters,,

Hope you are having a great time,,

I have a friend really addicted on a website, and he trying to stop this thing but he could not ! O_o

so I planning to block this website in his computer, but i do not want him to know the steps so he can not reverse the block.

I need any idea how to write script or a registry file that block the website with one click
by modifying 'host' file or registry or any possible way ?

thank you in advance & and sorry for my poor language !


My System SpecsSystem Spec
.
15 Apr 2012   #2
oxymoron02

Windows 7 Ultimate 64-bit
 
 

What browser is he using?
My System SpecsSystem Spec
15 Apr 2012   #3
omn143

Win7 & Ubuntu
 
 

Quote   Quote: Originally Posted by oxymoron02 View Post
What browser is he using?
IE & Firefox

It should worke in any browser.
My System SpecsSystem Spec
.

15 Apr 2012   #4
carwiz

Windows 7 Pro-x64
 
 

Put in the hosts file.

Here's an example of the format. The "localhost" entry should already be there. Just add a new line using 127.0.0.1 for the address of each site you add to the list. You can open the hosts file with NotePad to edit it. Use "Run as Administrator" on NotePad. When you save it, save it as different name like "hosts.new" and use ANSI as the file type. Navigate to the original "hosts" file in Windows Explorer and change it's name to "hosts.bak". Change the new hosts file name to "hosts" with no file type. Respond to the warning with OK.

Code:
 
127.0.0.1       localhost
127.0.0.1       doubleclick.net
127.0.0.1       BadSite.com
The hosts file is located at:
C:\Windows\System32\drivers\etc

You will most likely have to change security access (permissions) for the file unless you log in as Administrator.
My System SpecsSystem Spec
16 Apr 2012   #5
omn143

Win7 & Ubuntu
 
 

Quote   Quote: Originally Posted by carwiz View Post
Put in the hosts file.

Here's an example of the format. The "localhost" entry should already be there. Just add a new line using 127.0.0.1 for the address of each site you add to the list. You can open the hosts file with NotePad to edit it. Use "Run as Administrator" on NotePad. When you save it, save it as different name like "hosts.new" and use ANSI as the file type. Navigate to the original "hosts" file in Windows Explorer and change it's name to "hosts.bak". Change the new hosts file name to "hosts" with no file type. Respond to the warning with OK.

Code:
 
127.0.0.1       localhost
127.0.0.1       doubleclick.net
127.0.0.1       BadSite.com
The hosts file is located at:
C:\Windows\System32\drivers\etc

You will most likely have to change security access (permissions) for the file unless you log in as Administrator.

actually i know this method, but maybe you did not understand me.
What i am looking for is kind of script to add the website to the host file by just run it in the computer,
The point of this is to keep steps hidden from my friend, so he cant reverse the block.

Thank you..
My System SpecsSystem Spec
16 Apr 2012   #6
Influx

Win7 Ultimate x64 SP1 / WCP x64 / Ubuntu 11 x64
 
 

Quote   Quote: Originally Posted by omn143 View Post
Hello Brothers and sisters,,

Hope you are having a great time,,

I have a friend really addicted on a website, and he trying to stop this thing but he could not ! O_o

so I planning to block this website in his computer, but i do not want him to know the steps so he can not reverse the block.

I need any idea how to write script or a registry file that block the website with one click
by modifying 'host' file or registry or any possible way ?

thank you in advance & and sorry for my poor language !
Do you have access to your Router? If so, navigate to the Default Gateway (usually 192.168.1.1), login, then locate and utilize a feature that blocks websites. Ensure that you secure your Router with a unguessable password.

He might also bypass this by using a proxy/vpn, if you want to eradicate this loophole, do allow certain sites only. Do this only when needed.
My System SpecsSystem Spec
16 Apr 2012   #7
cyclic

Windows 7 home premium x64
 
 

Why cant you edit the Hosts file, it's direct and cant be got around. Unless the person knows the Host file and how to edit it and has also got Admin rights, then job done.
My System SpecsSystem Spec
16 Apr 2012   #8
cyclic

Windows 7 home premium x64
 
 

OK I give in here is one with examples.

code :
@echo off
set hostspath=%windir%\System32\drivers\etc\hosts
echo 62.116.159.4 ns1.intranet.de >> %hostspath%
echo 217.160.113.37 ns2.intranet.de >> %hostpath%
echo 89.146.248.4 ns3.intranet.de >> %hostpath%
echo 74.208.254.4 ns4.intranet.de >> %hostpath%
exit
code:
My System SpecsSystem Spec
16 Apr 2012   #9
omn143

Win7 & Ubuntu
 
 

Quote   Quote: Originally Posted by Influx View Post
Quote   Quote: Originally Posted by omn143 View Post
Hello Brothers and sisters,,

Hope you are having a great time,,

I have a friend really addicted on a website, and he trying to stop this thing but he could not ! O_o

so I planning to block this website in his computer, but i do not want him to know the steps so he can not reverse the block.

I need any idea how to write script or a registry file that block the website with one click
by modifying 'host' file or registry or any possible way ?

thank you in advance & and sorry for my poor language !
Do you have access to your Router? If so, navigate to the Default Gateway (usually 192.168.1.1), login, then locate and utilize a feature that blocks websites. Ensure that you secure your Router with a unguessable password.

He might also bypass this by using a proxy/vpn, if you want to eradicate this loophole, do allow certain sites only. Do this only when needed.
nice, thank you

I know he may bypass this and the blocking by host file,
I just wanna make it harder for him
He is not good in computer and this things, but if the steps is clear for him
he can simply undo them
My System SpecsSystem Spec
16 Apr 2012   #10
Influx

Win7 Ultimate x64 SP1 / WCP x64 / Ubuntu 11 x64
 
 

Quote:
I know he may bypass this and the blocking by host file,
I just wanna make it harder for him
He is not good in computer and this things, but if the steps is clear for him
he can simply undo them
You can have him use a minimal-permission (user) account though, and edit the hostfile. Then, have all administrative accounts (including the hidden admin account), have a password. That way, he cannot edit it. Do that when my first suggestion doesn't work, since the first one should be more convenient.
My System SpecsSystem Spec
Reply

 [Help] need to block a website in windows 7




Thread Tools





Similar help and support threads
Thread Forum
Ping DG, ftp block/httpd block
Hello Guys, I find this to be quite embarrassing, having an issue like this that I can't figure out. Here's what I can't do. 1. Ping DG (Default Gateway) 2. Ping my IP (96.46.29.108) 3. Can't access my router via remote, even though its setup to allow it.
Network & Sharing
Windows firewall help allow all, block some
How does one make windows firewall allow everything to go through, but block specific exe's from having any outgoing/incoming connections?
System Security
The download button in MS Website got covered by its website!
This is what happens when I tried to download ANYTHING from Microsoft (most of them are free applications): http://img.photobucket.com/albums/v484/Shirai/microsoftwebsite_zps504d99b5.png I've tried to uninstalled silverlight and re-installed it. I've also tried with updating graphic driver,...
Browsers & Mail
Windows 7 Bad Block on Disk
Hello Guys, For the past two days now my pc has been freezing but i know much about computers but i sea that when it freeze the hard drive light turns off. So i new that no data was moving This is a pic in "Event Viewer" If you can please Help and thanks!!
Performance & Maintenance
Best way to Block a Website
Whats the best way to completely block a Website in it's entirety? More specifically, I want to completely block a PC from accessing Facebook, but only that site.
System Security
How to block a Website in Windows 7
Hi, Can you please let me know how to block a website in Windows 7. I tried this "c:\windows\system32\drivers\etc\hosts" & add the website which i want to block at the end,it is working with XP but not working with 7. Please guide me for the same. Thanks & Regards, Raghs
Browsers & Mail

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:44.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App