{"id":8682,"date":"2020-09-22T17:29:16","date_gmt":"2020-09-22T09:29:16","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8682"},"modified":"2020-09-22T22:08:14","modified_gmt":"2020-09-22T14:08:14","slug":"rndc-confgen","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/rndc-confgen","title":{"rendered":"rndc-confgen\u547d\u4ee4 – \u5bc6\u94a5\u751f\u6210\u5de5\u5177"},"content":{"rendered":"\n

rndc-confgen\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4e3arndc\u751f\u6210\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n\n\n\n

rndc\u547d\u4ee4\u901a\u8fc7TCP\u8fde\u63a5\u4e0eDNS\u670d\u52a1\u5668\u901a\u4fe1\uff0c\u53d1\u9001\u4f7f\u7528\u6570\u5b57\u7b7e\u540d\u8ba4\u8bc1\u7684\u547d\u4ee4\u3002\u5728rndc\u547d\u4ee4\u548cnamed\u5b88\u62a4\u8fdb\u7a0b\u7684\u5f53\u524d\u7248\u672c\u4e2d\uff0c\u552f\u4e00\u652f\u6301\u7684\u8ba4\u8bc1\u7b97\u6cd5\u662fHMAC-MD5,\u5b83\u5728\u8fde\u63a5\u7684\u6bcf\u4e00\u7aef\u4f7f\u7528\u5171\u4eab\u5bc6\u94a5\u3002\u8fd9\u4e3a\u547d\u4ee4\u8bf7\u6c42\u548cDNS\u670d\u52a1\u5668\u54cd\u5e94\u63d0\u4f9b\u4e86TSIG-style\u8ba4\u8bc1\u3002\u6240\u6709\u7684\u7ecf\u901a\u9053\u53d1\u9001\u7684\u547d\u4ee4\u5fc5\u987b\u7531\u670d\u52a1\u5668\u8ba4\u8bc6\u7684key_id\u6807\u8bb0\u3002rndc\u547d\u4ee4\u4f1a\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6\u4ee5\u786e\u5b9a\u5982\u4f55\u4e0eDNS\u670d\u52a1\u5668\u8054\u7cfb\u5fc5\u987b\u4f7f\u7528\u4f55\u79cd\u7b97\u6cd5\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>rndc-confgen [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-t<\u76ee\u5f55><\/td>\u6307\u5b9a\u4e00\u4e2a\u8fd0\u884cchroot\u76ee\u5f55\uff0crndc.key\u6587\u4ef6\u7684\u526f\u672c\u5c06\u88ab\u5199\u5165\u5230\u8be5\u76ee\u5f55\u4e2d<\/td><\/tr>
-s<IP\u5730\u5740><\/td>\u4e3a\u6765\u81earndc\u7684\u547d\u4ee4\u901a\u9053\u8fde\u63a5\u6307\u5b9a\u76d1\u542c\u7684IP\u5730\u5740\u3002\u9ed8\u8ba4\u503c\u662f\u73af\u56de\u5730\u5740127.0.0.1<\/td><\/tr>
-c<\u5bc6\u94a5\u6587\u4ef6><\/td>\u6307\u5b9a\u5907\u7528\u4f4d\u7f6e\u7684rndc.key\u5bc6\u94a5\u6587\u4ef6<\/td><\/tr>
-b<\u5bc6\u94a5\u5927\u5c0f><\/td>\u6307\u5b9a\u5bc6\u94a5\u7684\u5927\u5c0f\uff0c\u5355\u4f4d\u662f\u4f4d\u3002\u5fc5\u987b\u4ecb\u4e8e1\u548c512\u4f4d\u4e4b\u95f4\uff0c\u9ed8\u8ba4\u503c\u662f128<\/td><\/tr>
-p<\u7aef\u53e3><\/td>\u4e3a\u6765\u81earndc\u7684\u8fde\u63a5\u6307\u5b9a\u76d1\u542c\u7684\u547d\u4ee4\u901a\u9053\u7aef\u53e3\u3002\u9ed8\u8ba4\u503c\u662f953<\/td><\/tr>
-u<\u7528\u6237><\/td>\u8bbe\u7f6e\u751f\u6210\u7684rndc.key\u5bc6\u94a5\u6587\u4ef6\u7684\u6240\u6709\u8005<\/td><\/tr>
-r<\u968f\u673a\u6587\u4ef6><\/td>\u6307\u5b9a\u7528\u4e8e\u751f\u6210\u6388\u6743\u968f\u673a\u6570\u636e\u6e90<\/td><\/tr>
-k<\u5bc6\u94a5\u540d\u79f0><\/td>\u6307\u5b9arndc\u8ba4\u8bc1\u5bc6\u94a5\u7684\u5bc6\u94a5\u540d\u79f0<\/td><\/tr>
-a<\/td>\u81ea\u52a8rndc\u914d\u7f6e\uff0c\u521b\u5efa\u5bc6\u94a5\u6587\u4ef6\/etc\/rndc.key<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u4e3arndc\u751f\u6210\u914d\u7f6e\u6587\u4ef6\/etc\/rndc.conf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# pwdhash -c linuxcool linux<\/pre>\n\n\n\n

\u81ea\u52a8rndc\u914d\u7f6e\uff0c\u521b\u5efa\u5bc6\u94a5\u6587\u4ef6\/etc\/rndc.key\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# rndc-confgen -a<\/pre>\n\n\n\n

\u66f4\u65b0key\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# rndc-confgen<\/pre>\n","protected":false},"excerpt":{"rendered":"

rndc-confgen\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u4e3arndc\u751f\u6210\u914d\u7f6e\u6587\u4ef6\u3002 rndc\u547d\u4ee4\u901a\u8fc7TCP\u8fde\u63a5\u4e0eDNS\u670d\u52a1\u5668\u901a\u4fe1 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8682"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8682"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8682\/revisions"}],"predecessor-version":[{"id":8933,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8682\/revisions\/8933"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}