1

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

My Hosts file

 127.0.0.1       localhost
 127.0.1.1       Ubuntu.local    Ubuntu
 127.0.0.1       dailymotion.com *.dailymotion.com http://www.dailymotion.com*
 # 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 http://dailymotion.com/

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

Not interested in weird iptables commands

Thanks

Thanks to Achu

enter image description here

8
  • 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 server_name.com or ip address. If the content is called by ip address your hosts file will not work.
    – Panther
    Apr 25, 2013 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, 2013 at 19:06
  • why the same stuff is working in windows 7 and in windows 8 ??? hosts file
    – Qasim
    Apr 25, 2013 at 19:06
  • youtube is already blocked in my country
    – Qasim
    Apr 25, 2013 at 19:08
  • 1
    @XxxXxx please try this way 127.0.0.1 www.dailymotion.com 127.0.0.1 dailymotion.com 127.0.0.1 *.dmcdn.net 127.0.0.1 dmcdn.net put them on each line. i saw videos come from dmcd.net
    – Achu
    Apr 25, 2013 at 19:16

1 Answer 1

4

Please put this way

127.0.0.1 www.dailymotion.com 
127.0.0.1 dailymotion.com 
127.0.0.1 *.dmcdn.net 
127.0.0.1 dmcdn.net 

I can see that dailymotion video's comes from dmcd.net

Not the answer you're looking for? Browse other questions tagged .