Bind Configuration RNDC Remote Control

Source: Internet
Author: User
Tags hmac

First two BIND DNS servers to function correctly.

Primary DNS server ip:192.168.1.100

Client DNS server ip:192.168.1.101

1 Primary DNS-side configuration:

cd/etc/

Generate Rndc.conf File

Rndc-confgen > rndc.conf

View Files

Cat rndc.conf

# Start of Rndc.conf
Key "Rndc-key" {
Algorithm HMAC-MD5;
Secret "vcl5wc2ghczcu7ju+ajc1q==";
};

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 "vcl5wc2ghczcu7ju+ajc1q==";
# };
#
# controls {
# inet 127.0.0.1 Port 953
# allow {127.0.0.1;} keys {"Rndc-key";};
# };
# End of named.conf

Vim named.conf

Add the following to the end of the named.conf

Support Remote RNDC control
Key "Rndc-key" {
Algorithm HMAC-MD5;
Secret "vcl5wc2ghczcu7ju+ajc1q==";
};

inet: Only allow local use of RNDC control to change * to 127.0.0.1
Allow: Allows this DNS IP, KEY to be managed via RNDC, set as client IP here
Controls {
inet * Port 953
Allow {localhost; 192.168.1.101;} keys {"Rndc-key";};
};

Delete Rndc.key

RM rndc.key-f

Restart bind

Service named restart

2 Client Configuration

cd/etc/

Generate Rndc.conf File

Rndc-confgen > rndc.conf

Edit the file, modify the value in the secret Primary DNS server configuration

Vim rndc.conf

# Start of Rndc.conf
Key "Rndc-key" {
Algorithm HMAC-MD5;
Secret "vcl5wc2ghczcu7ju+ajc1q==";
};

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 "vcl5wc2ghczcu7ju+ajc1q==";
# };
#
# controls {
# inet 127.0.0.1 Port 953
# allow {127.0.0.1;} keys {"Rndc-key";};
# };
# End of named.conf

Vim named.conf

Add the following to the end of the named.conf note: The value of secret is the same as the secret value in the primary server

Support Remote RNDC control
Key "Rndc-key" {
Algorithm HMAC-MD5;
Secret "vcl5wc2ghczcu7ju+ajc1q==";
};

inet: Only allow local use of RNDC control to change * to 127.0.0.1
Allow: Allows this DNS IP, KEY to be managed through RNDC, which is set as the primary DNS server IP
Controls {
inet * Port 953
Allow {localhost; 192.168.1.100;} keys {"Rndc-key";};
};

Delete Rndc.key

RM rndc.key-f

Restart bind

Service named restart

Bind Configuration RNDC Remote Control

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.