Monday, 15 October 2012

Howto Block YouTube Video in Linux Box ?(Squid)

a simple trick for blocking youtube videos using squid Proxy.Add the following line to /etc/squid/squid.conf

#vim /etc/squid/squid.conf

## The videos come from several domains so block all
acl blk_youtube dstdomain

http_access deny blk_youtube


#service squid restart

How To Block Websites In Ubuntu (Linux)

How To Block Websites Using HOSTS File

Use the following command to edit HOSTS file
sudo gedit /etc/hosts
Suppose you want to block YouTube and Facebook on Ubuntu. Just add the following two lines in file as shown in the screenshot and click save.
Restart your computer. Now you won't be able to access these websites, no matter whatever web browser you use ;)

1 comment: