Monday, May 16, 2011

How To Block Website

type='html'>For security reason, you can block certain websites to be accessed from your computer. This is to ensure that your kids or other user not to access that websites (such as porn sites or accessing virus/malware) for computer and moral protections.

Here I want to show how it can be made in Windows XP:

1. Find the 'hosts' file in your computer
---> C:\Windows\System32\Drivers\etc\hosts

2. Ensure that the file isn't "Read-Only"
---> Right click 'hosts' file and select Properties. Make sure the "Read-Only" attribute is unchecked.

3. Open the 'hosts' file by Notepad from a list of programs.
---> Once you have the hosts file opened in Notepad, you will see the line written as below:

127.0.0.1 localhost

4. To block an unwanted web page, add the sites below the 127.0.0.1 localhost.
---> e.g: To block www.youtube.com

127.0.0.1 localhost
127.0.0.1 www.youtube.com

5. Save the 'hosts' file when you have finished.
---> Go to 'File' and click 'Save'.

Now try open the websites that have been added (for blocking) in the 'hosts' file. Your web browser will deny it and the pages cannot be open.

OR

Ping the website and you will get the results as below:
------------------------------------------------------------
Pinging www.youtube.com [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms