Help In Linux

Linux Technical Blog
April 4, 2014

Disable recursive queries bind in CentOS



So, you have a lot of people using your server for name name server queries ? That uses your bandwidth ? Not a problem here is the step to overcome that.


Open the file /etc/named.conf

 vi /etc/named.conf


and add below lines by replacing the old allow-recursion and allow-transfer lines

allow-transfer {“none”;};
allow-recursion {“none”;};
recursion no;

restart the named service using the below command and you are done.


 /etc/init.d/named restart


You test the same using dig command, you should find the following output.

[root@ns399932 ~]# dig @ A

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.1 <<>> @ A
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<


Thank you for watching

11 Comments to “Disable recursive queries bind in CentOS”

Leave a Comment

Protected by WP Anti Spam