Wanna to block some websites on your Ubuntu system? Whole procedure is same with windows (Block Websites In Windows), only difference is location of hosts file. Inwindows hosts file has path C:\ WINDOWS\ system32\ drivers\ etc while in ubuntu hosts file exist under /etc directory.
Note: You must have root privileges for implementing this trick (For accessing root privileges Open terminal with shortcut Ctrl+Alt+T, type command as "sudo nautilus" without quotes, enter the root password, root directory will open). Suppose you have to block www.orkut.com. Now come to procedure:
- Go to File System Directory (Click on File System on the right side of your root directory)
- Now open /etc/hosts
- Plain text document will open with info:
*-+127.0.0.1 localhost
127.0.1.1 ubuntu.ubuntu-domain ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters - Below 127.0.1.1 ubuntu.ubuntu-domain ubuntu, write127.0.0.1 www.orkut.com
- Save it.
- Now try to open orkut, it will give error Firefox can't establish a connection to the server at www.orkut.com. Orkut is now blocked.
- In the same way you can block any site, just write site url after 127.0.0.1
For unblocking , delete 127.0.0.1 www.orkut.com
No comments:
Post a Comment