Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know hot to block single tumblr blog with

127.0.1.1 something.tumblr.com

but I want to block entire tumblr. I tried 127.0.1.1 tumblr.com but it's not working.

Is there a way to do this?

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

Install dnsmasq:

sudo apt-get install dnsmasq

Then in /etc/dnsmasq.conf (which you may have to create) add the line:

address=/tumblr.com/127.0.0.1

This will block tumblr.com and all of its subdomains by redirecting it to localhost (127.0.0.1).

share|improve this answer
    
Smart and simple way. –  Luis Alvarado Jun 13 '12 at 4:29
1  
Note this won't do anything unless you also set up your connection to use localhost/dnsmasq for name resolution. –  izx Jun 13 '12 at 5:45
    
and how do you setup connection to use dnsmasq? do you have any link? –  user1079002 Jun 14 '12 at 22:22
    
@user1079002 Connection setup can be found in this link help.ubuntu.com/community/Dnsmasq –  Neeraj T Aug 3 '13 at 6:42
add comment

The /etc/hosts file does NOT support wildcard subdomains. i.e. you can't say 127.0.0.1 *.tumblr.com and have it block all URLs of the form something.tumblr.com.

If you want to block these at the browser level, you can either use a plugin or better, a filtering proxy like Privoxy.

If you want to block these at the network level, so that no one on that computer can access the sites, you need a simple firewall rule to block something.tumblr.com's IP range, which at first glance appears to be 50.97.143.0/24, i.e. 50.97.143.0-50.97.143.255.

share|improve this answer
add comment

Looking at and taking the IP address you entered as literal, you are typing it wrong. Instead of 127.0.1.1 it should be 127.0.0.1

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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