Skip to content

Whitelist

Daniel Triendl edited this page Jun 19, 2018 · 3 revisions

A whitelist can be implemented by adding a passthru response policy zone.

Add the whitelist zone before the AdBlock zone to the BIND options and specify policy passthru for this zone.

// For AdBlock
response-policy {
	zone "rpz-whitelist.example.com" policy passthru;
	zone "rpz.example.com";
};

Define the rpz whitelist zone in addition to the rpz zone

// AdBlock Whitelist
zone "rpz-whitelist.example.com" {
	type master;
	file "/etc/bind/db.rpz-whitelist.example.com";
};

Add domain names you want to whitelist to db.rpz-whitelist.example.com.

@ 3600 IN SOA @ admin.example.com. 0 86400 7200 2592000 86400
@ 3600 IN NS ns.example.com.
example.net IN CNAME .
*.example.net IN CNAME .

This example will whitelist example.net and all it's subdomains. You can of course only add specific subdomains if you want.

Clone this wiki locally