Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Please help me block NSFW subreddits like this one (http://www.reddit.com/r/NSFW/)

I would like to keep access to SFW subreddits, but block certain subreddits that are distracting or NSFW. I know how to filter domains. (see files below) But how do I apply the filter only to certain subreddits?

So far I have set up the following files:

blocklist.conf

zone "adimages.go.com" { type master; file "dummy-block"; };
zone "admonitor.net" { type master; file "dummy-block"; };
zone "ads.specificpop.com" { type master; file "dummy-block"; };
...

named.conf

options {
allow-query { 127.0.0.1; };
allow-recursion { 127.0.0.1; };
directory "c:\bind\etc";
notify no;
};

zone "." IN {
type hint;
file "c:\bind\etc\named.root";
};

zone "localhost" IN {
allow-update { none; };
file "c:\bind\etc\localhost.zone";
type master;
};

zone "0.0.127.in-addr.arpa" IN {
allow-update { none; };
file "c:\bind\etc\named.local";
type master;
};

key "rndc-key" {
algorithm hmac-md5;
secret   "O5VdbBKKEMzuLYjM60CxwuLLURFA6peDYHCBvZCqjoa6KtL1ggD7OTLeLtnu2jR5I5cwA/MQ8UdHc+9tMJRSiw==";
};

controls {
inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; };
};

//Blocklist
include "c:\bind\etc\blocklist.conf";

dummy-block

$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                          2         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1
*       IN      A       127.0.0.1
share|improve this question

1 Answer 1

You can't with Bind9. You can only not resolve the entire reddit.com with DNS for which they can just point to another DNS server or use the numeric IP to reach it.

What you want is to do "Content Filtering" in your firewall/proxy and disallow that URL.

share|improve this answer

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.