Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have added a site in my hosts file but its not working, please view the pics.

My Hosts file       localhost       Ubuntu.local    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

As added in hosts file the site is blocked enter image description here

Copy Paste The Video Link ....Site is not Block enter image description here

How do i block each and every link that has

I have tried with to hosts file, nothing work..But in Windows 7 & Windows 8 its working perfectly

Not interested in weird iptables commands


Thanks to Achu

enter image description here

share|improve this question

marked as duplicate by Thomas Ward, Eric Carvalho, green7, Raja, belacqua Apr 27 '13 at 3:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You have to look where the video is coming from. My guess would by youtube. You probably want to use a web proxy such as privoxy or squid, but configuration can be a bit complicated. Hard to know without knowing where the video is from (Go under Tools -> Web Developer -> Page source and see if you can determine where the video is coming from). Also know that you can call content by or ip address. If the content is called by ip address your hosts file will not work. – bodhi.zazen Apr 25 '13 at 18:58
1st of the duplicate question is very old and i want to block it , @bodhi.zazen ok let me check and update ...thanks all – Qasim Apr 25 '13 at 19:06
why the same stuff is working in windows 7 and in windows 8 ??? hosts file – Qasim Apr 25 '13 at 19:06
@XxxXxx please try this way * put them on each line. i saw videos come from – Achu Apr 25 '13 at 19:16
@Achu thanks a lot man ......blocked – Qasim Apr 25 '13 at 19:20
up vote 4 down vote accepted

Please put this way * 

I can see that dailymotion video's comes from

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.