How to disable Recursive DNS

Recursive DNS enabled can cause some issues related to unintended denial of service attacks.  As such, it is recommended it is disabled unless you have a very specific reason for having it enabled.

As every system is different, the general method of disabling it is as follows:
1. Open named.conf.  This file is usually found in /etc/named.conf, however if you cannot find it there, try performing:

locate named.conf

2. Under the Options settings, make sure the follow line exists; if not, add it:

recursion no;

3. After that, you’re all set.  All that is left is to reboot your DNS server by running this command:

service named restart

 

admin