BIND: Stop Recursion DNS Under Linux / UNIX

Q. How do I stop recursion (recursive query) under BIND 9 DNS server?

A. A DNS query may be either a recursive query or a non-recursive query. If recursion is set to ‘yes’ (the default) the server will always provide recursive query behaviour if requested by the client (resolver). If set to ‘no’ the server will only provide iterative query behaviour. If the answer to the query already exists in the cache it will be returned irrespective of the value of this statement. This statement essentially controls caching behaviour in the server.

Advertisement

Open named.conf file and make sure following settings exists under Options { … } settings:
recursion no;
Save and close the file. Reload named:
# service named restart

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

1 comment… add one
  • Nilesh Aug 26, 2008 @ 16:55

    Hey this was a simple one…

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.