named

named intro

What is named? STFW

named install

Get the port

cd /usr/ports/databases/dns/bind914/
make install clean

Or

portmaster dns/bind914/

named tips

rate-limit

options {
...
rate-limit {
        responses-per-second 10;
};
...
}

named adblock

Create in there a file called db.rpz with the following contents

$TTL 36h
@            IN    SOA  localhost. root.localhost.  (
2015112501   ; serial
1h           ; refresh
30m          ; retry
1w           ; expiry
30m)         ; minimum
IN     NS    localhost.
localhost       A   127.0.0.1
www.some-website.com    A        127.0.0.1
www.other-website.com   CNAME    fake-hostname.com.

Edit named.conf and add this section

zone "rpz" {
type master;
file "/usr/local/etc/namedb/master/db.rpz";
};

Add the response-policy option to named.conf

options {
...
response-policy { zone "rpz"; };
}

Now customize db.rpz

wget -O - http://static.nogafa.org/db.rpz