WEBISTE BLOCKING VIA “HOSTs FILE” MANIPULATION Many a times - TopicsExpress



          

WEBISTE BLOCKING VIA “HOSTs FILE” MANIPULATION Many a times we want to block access to a number of website for reasons whatsoever… Instead of using 3rd party softwares we can revert to a simple solution built right into Microsoft Windows and Linux. It’s the hosts file….. FUNCTION OF HOSTS FILE:- Windows hosts file is used to map IP addresses ,which is otherwise handled by (DNS), in special cases, hosts file allows us to bypass that server, by manipulation of this, a PC can be made to view or cannot view specific addresses. DIVING INTO HOSTS FILE(in windows):- Navigate to C:\Windows\System32\drivers\etc.To edit and save the hosts file, admin rights are needed. Format of the entries in the hosts file IP_ADDRESS domain name Basic mapping from IP to domain. 192.168.100.21 samplesite MANIPULATION OF HOSTS FILE: The actual implementation is Loopback address, a computer that refers to itself. If the loopback address is pinged, the machine being pinged would be the machine doing the pinging (127.0.0.1) , in other words,unwanted domain name can be re-directed back to the local machine. 127.0.0.1 blockedsite in this way enter the sites you want to block and save in the exact extension and restart your machine... the sites will be instantly blocked and prevented from gaining access!!! DIVING INTO HOSTS FILE(in linux):- ->Open a terminal window. ->Type: sudo cp /etc/hosts /etc/hosts.bak ->To block a sample site:- sudo sh -c echo 0.0.0.0 site/ >> /etc/hosts Alternative method:- sudo sh -c echo 127.0.0.1 samplesite/ >> /etc/hosts
Posted on: Wed, 13 Nov 2013 10:20:11 +0000

Trending Topics



Recently Viewed Topics




© 2015