DNS: Domain Blacklisting

A brief how-to blacklist DNS domains using BIND

  1. edit /etc/named.conf
  2. insert zone "DOMAINTOBEBLOCKED.TLD" IN { type master; file "/var/named/sinkhole/redirect.nowhere"; };
  3. edit /var/named/sinkhole/redirect.nowhere
  4. insert
    $TTL    600
    @                       1D IN SOA       localhost root (
                                            123             ; serial
                                            3H              ; refresh
                                            15M             ; retry
                                            1W              ; expiry
                                            1D )            ; minimum
    
                            1D IN NS        @
                            5 IN A          IPADDRESS       ; replace with IP address to be redirected to or IDS/IPS to be alerted
  5. restart named systemctl restart named

source

Advertisements
This entry was posted in BSD, Linux, Security, Server and tagged , , . Bookmark the permalink.