The DNS filtering How-to page - Yaritz Consulting: The Consultation Company  


The DNS filtering how-to page

This page is written for ISC BIND and these basics can be applied to any almost any DNS server.

Now to get this installed, you need to download and install BIND.

Now to get down to the basics:

  1. Unzip code.
  2. cd to binddir
  3. run ./configure
  4. run make and make install

    Now for the fun part!

  5. Create a zone file (most are in /etc/named/) that contains the following:
    
    $ORIGIN myblockdomain.example.com.
    
    @	86400   IN      SOA     myblockdomain.example.com. username.mydomain.example.com. 2004020182 10800 3600 604800 86400
    
    	86400	IN	A	127.0.0.1
    
    	86400	IN	NS	dns1
    
    *	86400	IN	A	127.0.0.1
    
    dns1	86400	IN	A	192.168.1.1
    
    

    The line with the asterisk is a catch-all for subdomains under myblockdomain.example.com and so forth.  You might need to replace 192.168.1.1 with the IP of your local DNS server.  This will allow other local DNS servers to know where to go to find the route entry.

  6. Create the zones you want to block and point them to this file.
  7. Test away!!
You are now done.  Please test your setup.