使用bind9 的rndc 控制dns

使用rndc-confgen生成rndc.conf之后,如下:

# Start of rndc.confkey "rndc-key" { algorithm hmac-md5; secret "Cm9Lc0JG5wJcsoRj3PbKqw==";};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 "Cm9Lc0JG5wJcsoRj3PbKqw==";# };## controls {# inet 127.0.0.1 port 953# allow { 127.0.0.1; } keys { "rndc-key"; };# };# End of named.conf

# Use with the following in named.conf, adjusting the allow list as needed:之后的内容复制到named.conf中,去掉注释,重启named -g,然后在另外一个终端测试rndc reload,成功。

你可能感兴趣的:(Algorithm,list,测试,终端)