• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to configure bind with rndc on centos 6

2565

To Configure Bind with RNDC on CentOS 6

RNDC stands for Remote Name Daemon Controls which allows us to control the Daemon for a Bind DNS server from a remote machine. By default it uses the port number  953, so we can perform some task with the named daemon using rndc command from the client machine which is allowed to control the daemon by using a rndc key, here the key must be configured in both the named.conf file from bind server and rndc.conf file from the client side

Server Side:

RNDC key will be generated automatically after starting Bind Daemon, if it is not generated,  use the below command to generate it

[root@ns1 ~]# rndc-confgen -a
wrote key file " /etc/rndc.key" 

you can open your rndc.key file and copy it to the named.conf file 

[root@ns1 ~]# vim /etc/named.conf 
key " rndc-key"  {
        algorithm hmac-md5 
        secret " L8bw0I4nLP8WDNCHjhnoxg=="  
} 
controls {
    inet * port 953
    allow { 127.0.0.1  192.168.7.223  } keys { " rndc-key"   } 
} 

you have  to restart the service to make changes effective

[root@ns1 ~]# service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]

Client Side:

proceed  to install the bind package on the client side machine using the following command : 

[root@localhost ~]# yum install bind* -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
base                                                                                                                                                                                         | 3.7 kB     00:00     
base/primary_db                                                                                                                                                                              | 4.7 MB     00:00     
extras                                                                                                                                                                                       | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                                            |  30 kB     00:00     
updates                                                                                                                                                                                      | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                                           | 7.0 MB     00:00     
Resolving Dependencies
-->  Running transaction check
--->  Package bind.x86_64 32:9.8.2-0.62.rc1.el6_9.5 will be installed
--->  Package bind-chroot.x86_64 32:9.8.2-0.62.rc1.el6_9.5 will be installed
--->  Package bind-devel.x86_64 32:9.8.2-0.62.rc1.el6_9.5 will be installed
.
.
.
Installed:
  bind.x86_64 32:9.8.2-0.62.rc1.el6_9.5  bind-chroot.x86_64 32:9.8.2-0.62.rc1.el6_9.5  bind-devel.x86_64 32:9.8.2-0.62.rc1.el6_9.5  bind-dyndb-ldap.x86_64 0:2.3-8.el6  bind-sdb.x86_64 32:9.8.2-0.62.rc1.el6_9.5 

Dependency Installed:
  postgresql-libs.x86_64 0:8.4.20-8.el6_9                                                                                                                                                                           

Updated:
  bind-libs.x86_64 32:9.8.2-0.62.rc1.el6_9.5                                                               bind-utils.x86_64 32:9.8.2-0.62.rc1.el6_9.5                                                              

Complete!

once done, you can now generate rndc configuration 

[root@localhost ~]# rndc-confgen 
# Start of rndc.conf
key " rndc-key"  {
    algorithm hmac-md5 
    secret " dr+EU5Y3v44yqfngNo5u3Q=="  
} 

options {
    default-key " rndc-key"  
    default-server 127.0.0.1 
    default-port 953 
} 
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
# key " rndc-key"  {
#     algorithm hmac-md5 
#     secret " dr+EU5Y3v44yqfngNo5u3Q=="  
# } 
# 
# controls {
#     inet 127.0.0.1 port 953
#         allow { 127.0.0.1  } keys { " rndc-key"   } 
# } 
# End of named.conf

After that copy the output of above command to a new rndc configuration file /etc/rndc.conf

finally, let’ s check the named daemon status for DNS server from this client machine using rndc command

[root@localhost ~]# rndc status 192.168.7.222
version: 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.5
CPUs found: 1
worker threads: 1
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

With this, the method to  Configure Bind with RNDC on CentOS 6 comes to an end.

Tags:
lucas
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Why the need of using the RDNC

A

RNDC stands for Remote Name Daemon Controls which allows us to control the Daemon for a Bind DNS server from a remote machine. By default it uses the port number  953, so we can perform some

Q

when i check my rndc status i got the following error, why?

A

Any alternative you may missing neither rndc.conf file nor rndc.key file so you must generate it using following commands. To generate rndc configuration use the below command and copy the

Q

Why do I have to update nameserver records at the registrar?

A

When you update your nameserver records at the registrar, the registrar can push your domain's DNS information to their DNS namespace.

Q

How do I change my Webmin password if I can't login?

A

Included with the Webmin distribution is a program called changepass.pl to solve erecisely this problem. Assuming you have installed Webmin in /usr/libexec/webmin, you could change the passw

Q

How do I run setup.sh?

A

After extracting the Webmin tar file, cd into the webmin-1.890 directory and type ./setup.sh. Because the root user on many system does not have the current directory in his path, just typing

Related Tutorials in How to configure bind with rndc on centos 6

Related Tutorials in How to configure bind with rndc on centos 6

How To Install AnyDesk on Centos 7
How To Install AnyDesk on Centos 7
Apr 2, 2018
How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to install PHP ImageMagick on CentOS 7
How to install PHP ImageMagick on CentOS 7
Nov 4, 2017
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
Jun 4, 2019
How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to enable or disable repositories in CentOS
How to enable or disable repositories in CentOS
Mar 28, 2018
How to install AWStats on CentOS 7
How to install AWStats on CentOS 7
Dec 8, 2017
How to install Apache JMeter in CentOS 7
How to install Apache JMeter in CentOS 7
Mar 24, 2017

Related Forums in How to configure bind with rndc on centos 6

Related Forums in How to configure bind with rndc on centos 6

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
CentOS
ceriaimmaculate class=
setfacl : command not found
Jan 3, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018
CentOS
landon class=
Command to find SNMP Version
May 28, 2018
CentOS
arjitharon class=
cannot start minio service help
Mar 10, 2018
Apache tomcat
AadrikaAnshu class=
Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program
Jun 17, 2019
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019
OpenVAS
frank class=
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Dec 20, 2018
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.