Sunday, September 4, 2011

to Block sites in ubuntu

1. open terminal
2. type sudo gedit /etc/hosts
3. A Text editor will open saying that:
127.0.0.1 localhost.localdomain localhost
4. type the website address you want to block below the above stated.
eg:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 www.websitename.com

5. then restart ur apache server using following command:
sudo /etc/init.d/apache2 restart
6. if u don't have apache server then open terminal and type following:
sudo apt-get install apache

No comments:

Post a Comment