1How To Block Websites In Ubuntu?

Posted by Harwinder Kumar at 6/26/2011 Posted in:

Ubuntu Logo
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. In windows 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, follow the 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:

    *-+    localhost    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    ubuntu.ubuntu-domain    ubuntu, write    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
Note: For unblock, delete    www.orkut.com
Hope You Liked It. Receive Latest Posts Directly To Your Email
Get Free Updates:
Click On The Confirmation Link Sent To Your Inbox Or Spam

1 comments so far:

Curious Apprentice said on 3/25/2012 2:00 AM:

On ubuntu 11.10 if you are using firefox 11.0 then this might not work ! Im getting this strange response. When Im trying to access a blocked site using FFox it opens up but when Im trying to access it using chrome it shows me it is blocked.


We love to hear from you! Leave us a comment:

© 2014 Learn The Basics Of Ethical Hacking About | Site Map | Privacy Policy | Contact