{"id":181455,"date":"2021-03-09T14:19:47","date_gmt":"2021-03-09T06:19:47","guid":{"rendered":"https:\/\/q13zd.cn\/?p=181455"},"modified":"2021-08-27T17:57:26","modified_gmt":"2021-08-27T09:57:26","slug":"basic-learning-13","status":"publish","type":"post","link":"https:\/\/q13zd.cn\/basic-learning-13.html","title":{"rendered":"\u7b2c13\u7ae0 \u4f7f\u7528Bind\u63d0\u4f9b\u57df\u540d\u89e3\u6790\u670d\u52a1"},"content":{"rendered":"
\u7ae0\u8282\u7b80\u8ff0\uff1a\u00a0<\/strong><\/span><\/p>\n \u672c\u7ae0\u8bb2\u89e3\u4e86DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u7684\u539f\u7406\u4ee5\u53ca\u4f5c\u7528\uff0c\u4ecb\u7ecd\u4e86\u57df\u540d\u67e5\u8be2\u529f\u80fd\u4e2d\u6b63\u5411\u89e3\u6790\u4e0e\u53cd\u5411\u89e3\u6790\u7684\u4f5c\u7528\uff0c\u5e76\u901a\u8fc7\u5b9e\u9a8c\u7684\u65b9\u5f0f\u6f14\u793a\u4e86\u5982\u4f55\u5728DNS\u4e3b\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u6b63\u3001\u53cd\u89e3\u6790\u5de5\u4f5c\u6a21\u5f0f\uff0c\u4ee5\u4fbf\u8ba9\u5927\u5bb6\u6df1\u523b\u4f53\u4f1a\u5230DNS\u57df\u540d\u67e5\u8be2\u7684\u4fbf\u5229\u4ee5\u53ca\u5f3a\u5927\u3002<\/p>\n \u672c\u7ae0\u8fd8\u4ecb\u7ecd\u4e86\u5982\u4f55\u90e8\u7f72DNS\u4ece\u670d\u52a1\u5668\u4ee5\u53caDNS\u7f13\u5b58\u670d\u52a1\u5668\u6765\u63d0\u5347\u7528\u6237\u7684\u57df\u540d\u67e5\u8be2\u4f53\u9a8c\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528chroot\u7262\u7b3c\u673a\u5236\u63d2\u4ef6\u6765\u4fdd\u969cbind\u670d\u52a1\u7a0b\u5e8f\u7684\u53ef\u9760\u6027\uff0c\u5e76\u5411\u5927\u5bb6\u6f14\u793a\u5982\u4f55\u5728\u4e3b\u670d\u52a1\u5668\u4e0e\u4ece\u670d\u52a1\u5668\u4e4b\u95f4\u90e8\u7f72TSIG\u5bc6\u94a5\u52a0\u5bc6\u529f\u80fd\uff0c\u6765\u8fdb\u4e00\u6b65\u4fdd\u969c\u8fed\u4ee3\u67e5\u8be2\u4e2d\u6570\u636e\u7684\u5b89\u5168\u6027\u3002\u6700\u540e\uff0c\u672c\u7ae0\u8fd8\u4ece\u5b9e\u6218\u5c42\u9762\u8bb2\u89e3\u4e86DNS\u5206\u79bb\u89e3\u6790\u6280\u672f\uff0c\u8ba9\u6765\u81ea\u4e0d\u540c\u56fd\u5bb6\u3001\u4e0d\u540c\u5730\u533a\u7684\u7528\u6237\u90fd\u80fd\u83b7\u5f97\u6700\u4f18\u7684\u7f51\u7ad9\u8bbf\u95ee\u4f53\u9a8c\u3002<\/p>\n \u76f8\u4fe1\u5927\u5bb6\u5728\u5b66\u5b8c\u672c\u7ae0\u5185\u5bb9\u4e4b\u540e\uff0c\u4e00\u5b9a\u4f1a\u5bf9bind\u670d\u52a1\u7a0b\u5e8f\u6709\u66f4\u6df1\u5165\u7684\u4e86\u89e3\u548c\u8ba4\u8bc6\uff0c\u5e76\u80fd\u6df1\u523b\u5730\u4f53\u4f1a\u5230\u4f5c\u4e3a\u4e92\u8054\u7f51\u57fa\u7840\u8bbe\u65bd\u4e2d\u91cd\u8981\u4e00\u73af\u7684DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\uff0c\u5728\u4e92\u8054\u7f51\u4e2d\u6240\u627f\u62c5\u7684\u91cd\u8981\u89d2\u8272\u548c\u53d1\u6325\u7684\u91cd\u8981\u4f5c\u7528\u3002<\/p>\n \u76f8\u8f83\u4e8e\u7531\u6570\u5b57\u6784\u6210\u7684IP\u5730\u5740\uff0c\u57df\u540d\u66f4\u5bb9\u6613\u88ab\u7406\u89e3\u548c\u8bb0\u5fc6\uff0c\u6240\u4ee5\u6211\u4eec\u901a\u5e38\u66f4\u4e60\u60ef\u901a\u8fc7\u57df\u540d\u7684\u65b9\u5f0f\u6765\u8bbf\u95ee\u7f51\u7edc\u4e2d\u7684\u8d44\u6e90\u3002\u4f46\u662f\uff0c\u7f51\u7edc\u4e2d\u7684\u8ba1\u7b97\u673a\u4e4b\u95f4\u53ea\u80fd\u57fa\u4e8eIP\u5730\u5740\u6765\u76f8\u4e92\u8bc6\u522b\u5bf9\u65b9\u7684\u8eab\u4efd\uff0c\u800c\u4e14\u8981\u60f3\u5728\u4e92\u8054\u7f51\u4e2d\u4f20\u8f93\u6570\u636e\uff0c\u4e5f\u5fc5\u987b\u57fa\u4e8e\u5916\u7f51\u7684IP\u5730\u5740\u6765\u5b8c\u6210\u3002<\/p>\n \u4e3a\u4e86\u964d\u4f4e\u7528\u6237\u8bbf\u95ee\u7f51\u7edc\u8d44\u6e90\u7684\u95e8\u69db\uff0c\u57df\u540d\u7cfb\u7edf\uff08Domain Name System\uff0cDNS\uff09\u6280\u672f\u5e94\u8fd0\u800c\u751f\u3002\u8fd9\u662f\u4e00\u9879\u7528\u4e8e\u7ba1\u7406\u548c\u89e3\u6790\u57df\u540d\u4e0eIP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u7684\u6280\u672f\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u80fd\u591f\u63a5\u53d7\u7528\u6237\u8f93\u5165\u7684\u57df\u540d\u6216IP\u5730\u5740\uff0c\u7136\u540e\u81ea\u52a8\u67e5\u627e\u4e0e\u4e4b\u5339\u914d\uff08\u6216\u8005\u8bf4\u5177\u6709\u6620\u5c04\u5173\u7cfb\uff09\u7684IP\u5730\u5740\u6216\u57df\u540d\uff0c\u5373\u5c06\u57df\u540d\u89e3\u6790\u4e3aIP\u5730\u5740\uff08\u6b63\u5411\u89e3\u6790\uff09\uff0c\u6216\u5c06IP\u5730\u5740\u89e3\u6790\u4e3a\u57df\u540d\uff08\u53cd\u5411\u89e3\u6790\uff09\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u53ea\u9700\u8981\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u57df\u540d\u5c31\u80fd\u6253\u5f00\u60f3\u8981\u8bbf\u95ee\u7684\u7f51\u7ad9\u4e86\u3002DNS\u57df\u540d\u89e3\u6790\u6280\u672f\u7684\u6b63\u5411\u89e3\u6790\u4e5f\u662f\u6211\u4eec\u6700\u5e38\u4f7f\u7528\u7684\u4e00\u79cd\u5de5\u4f5c\u6a21\u5f0f\u3002<\/p>\n \u9274\u4e8e\u4e92\u8054\u7f51\u4e2d\u7684\u57df\u540d\u548cIP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u6570\u636e\u5e93\u592a\u8fc7\u5e9e\u5927\uff0cDNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u91c7\u7528\u4e86\u7c7b\u4f3c\u76ee\u5f55\u6811\u7684\u5c42\u6b21\u7ed3\u6784\u6765\u8bb0\u5f55\u57df\u540d\u4e0eIP\u5730\u5740\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u4ece\u800c\u5f62\u6210\u4e86\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684\u6570\u636e\u5e93\u7cfb\u7edf\uff0c\u5982\u56fe13-1\u6240\u793a\u3002<\/p>\n <\/p>\n \u56fe13-1\u00a0 DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u91c7\u7528\u7684\u76ee\u5f55\u6811\u5c42\u6b21\u7ed3\u6784<\/p>\n \u57df\u540d\u540e\u7f00\u4e00\u822c\u5206\u4e3a\u56fd\u9645\u57df\u540d\u548c\u56fd\u5185\u57df\u540d\u3002\u539f\u5219\u4e0a\u6765\u8bb2\uff0c\u57df\u540d\u540e\u7f00\u90fd\u6709\u4e25\u683c\u7684\u5b9a\u4e49\uff0c\u4f46\u5728\u5b9e\u9645\u4f7f\u7528\u65f6\u53ef\u4ee5\u4e0d\u5fc5\u4e25\u683c\u9075\u5b88\u3002\u76ee\u524d\u6700\u5e38\u89c1\u7684\u57df\u540d\u540e\u7f00\u6709.com\uff08\u5546\u4e1a\u7ec4\u7ec7\uff09\u3001.org\uff08\u975e\u8425\u5229\u7ec4\u7ec7\uff09\u3001.gov\uff08\u653f\u5e9c\u90e8\u95e8\uff09\u3001.net\uff08\u7f51\u7edc\u670d\u52a1\u5546\uff09\u3001.edu\uff08\u6559\u80b2\u673a\u6784\uff09\u3001.pub\uff08\u516c\u5171\u5927\u4f17\uff09\u3001.cn\uff08\u4e2d\u56fd\u56fd\u5bb6\u9876\u7ea7\u57df\u540d\uff09\u7b49\u3002<\/p>\n \u5f53\u4eca\u4e16\u754c\u7684\u4fe1\u606f\u5316\u7a0b\u5ea6\u8d8a\u6765\u8d8a\u9ad8\uff0c\u5927\u6570\u636e\u3001\u4e91\u8ba1\u7b97\u3001\u7269\u8054\u7f51\u3001\u4eba\u5de5\u667a\u80fd\u7b49\u65b0\u6280\u672f\u4e0d\u65ad\u6d8c\u73b0\uff0c\u5168\u7403\u7f51\u6c11\u7684\u6570\u91cf\u636e\u8bf4\u4e5f\u8d85\u8fc7\u4e8653\u4ebf\uff0c\u800c\u4e14\u6bcf\u5e74\u8fd8\u5728\u4ee57%\u7684\u901f\u5ea6\u8fc5\u901f\u589e\u957f\u3002\u8fd9\u4e9b\u56e0\u7d20\u5bfc\u81f4\u4e92\u8054\u7f51\u4e2d\u7684\u57df\u540d\u6570\u91cf\u8fdb\u4e00\u6b65\u6fc0\u589e\uff0c\u88ab\u8bbf\u95ee\u7684\u9891\u7387\u4e5f\u8fdb\u4e00\u6b65\u52a0\u5927\u3002\u5047\u8bbe\u5168\u7403\u7f51\u6c11\u6bcf\u4eba\u6bcf\u5929\u53ea\u8bbf\u95ee\u4e00\u4e2a\u7f51\u7ad9\u57df\u540d\uff0c\u800c\u4e14\u53ea\u8bbf\u95ee\u4e00\u6b21\uff0c\u4e5f\u4f1a\u4ea7\u751f53\u4ebf\u6b21\u7684\u67e5\u8be2\u8bf7\u6c42\uff0c\u5982\u6b64\u5e9e\u5927\u7684\u8bf7\u6c42\u6570\u91cf\u80af\u5b9a\u65e0\u6cd5\u88ab\u67d0\u4e00\u53f0\u670d\u52a1\u5668\u5168\u90e8\u5904\u7406\u6389\u3002DNS\u6280\u672f\u4f5c\u4e3a\u4e92\u8054\u7f51\u57fa\u7840\u8bbe\u65bd\u4e2d\u91cd\u8981\u7684\u4e00\u73af\uff0c\u4e3a\u4e86\u4e3a\u7f51\u6c11\u63d0\u4f9b\u4e0d\u95f4\u65ad\u3001\u7a33\u5b9a\u4e14\u5feb\u901f\u7684\u57df\u540d\u67e5\u8be2\u670d\u52a1\uff0c\u4fdd\u8bc1\u4e92\u8054\u7f51\u7684\u6b63\u5e38\u8fd0\u8f6c\uff0c\u63d0\u4f9b\u4e86\u4e0b\u97623\u79cd\u7c7b\u578b\u7684\u670d\u52a1\u5668\u3002<\/p>\n \u4e3b\u670d\u52a1\u5668<\/strong>\uff1a\u5728\u7279\u5b9a\u533a\u57df\u5185\u5177\u6709\u552f\u4e00\u6027\uff0c\u8d1f\u8d23\u7ef4\u62a4\u8be5\u533a\u57df\u5185\u7684\u57df\u540d\u4e0eIP\u5730\u5740\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb\u3002<\/p>\n \u4ece\u670d\u52a1\u5668<\/strong>\uff1a\u4ece\u4e3b\u670d\u52a1\u5668\u4e2d\u83b7\u5f97\u57df\u540d\u4e0eIP\u5730\u5740\u7684\u5bf9\u5e94\u5173\u7cfb\u5e76\u8fdb\u884c\u7ef4\u62a4\uff0c\u4ee5\u9632\u4e3b\u670d\u52a1\u5668\u5b95\u673a\u7b49\u60c5\u51b5\u3002<\/p>\n \u7f13\u5b58\u670d\u52a1\u5668<\/strong>\uff1a\u901a\u8fc7\u5411\u5176\u4ed6\u57df\u540d\u89e3\u6790\u670d\u52a1\u5668\u67e5\u8be2\u83b7\u5f97\u57df\u540d\u4e0eIP\u5730\u5740\u7684\u5bf9\u5e94\u5173\u7cfb\uff0c\u5e76\u5c06\u7ecf\u5e38\u67e5\u8be2\u7684\u57df\u540d\u4fe1\u606f\u4fdd\u5b58\u5230\u670d\u52a1\u5668\u672c\u5730\uff0c\u4ee5\u6b64\u6765\u63d0\u9ad8\u91cd\u590d\u67e5\u8be2\u65f6\u7684\u6548\u7387\u3002<\/p><\/blockquote>\n \u7b80\u5355\u6765\u8bf4\uff0c\u4e3b\u670d\u52a1\u5668\u662f\u7528\u4e8e\u7ba1\u7406\u57df\u540d\u548cIP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u7684\u771f\u6b63\u670d\u52a1\u5668\uff0c\u4ece\u670d\u52a1\u5668\u5e2e\u52a9\u4e3b\u670d\u52a1\u5668\u201c\u6253\u4e0b\u624b\u201d\uff0c\u5206\u6563\u90e8\u7f72\u5728\u5404\u4e2a\u56fd\u5bb6\u3001\u7701\u5e02\u6216\u5730\u533a\uff0c\u4ee5\u4fbf\u8ba9\u7528\u6237\u5c31\u8fd1\u67e5\u8be2\u57df\u540d\uff0c\u4ece\u800c\u51cf\u8f7b\u4e3b\u670d\u52a1\u5668\u7684\u8d1f\u8f7d\u538b\u529b\u3002\u7f13\u5b58\u670d\u52a1\u5668\u4e0d\u592a\u5e38\u7528\uff0c\u4e00\u822c\u90e8\u7f72\u5728\u4f01\u4e1a\u5185\u7f51\u7684\u7f51\u5173\u4f4d\u7f6e\uff0c\u7528\u4e8e\u52a0\u901f\u7528\u6237\u7684\u57df\u540d\u67e5\u8be2\u8bf7\u6c42\u3002<\/p>\n DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u91c7\u7528\u5206\u5e03\u5f0f\u7684\u6570\u636e\u7ed3\u6784\u6765\u5b58\u653e\u6d77\u91cf\u7684\u201c\u533a\u57df\u6570\u636e\u201d\u4fe1\u606f\uff0c\u5728\u6267\u884c\u7528\u6237\u53d1\u8d77\u7684\u57df\u540d\u67e5\u8be2\u8bf7\u6c42\u65f6\uff0c\u5177\u6709\u9012\u5f52\u67e5\u8be2\u548c\u8fed\u4ee3\u67e5\u8be2\u4e24\u79cd\u65b9\u5f0f\u3002\u6240\u8c13\u9012\u5f52\u67e5\u8be2\uff0c\u662f\u6307DNS\u670d\u52a1\u5668\u5728\u6536\u5230\u7528\u6237\u53d1\u8d77\u7684\u8bf7\u6c42\u65f6\uff0c\u5fc5\u987b\u5411\u7528\u6237\u8fd4\u56de\u4e00\u4e2a\u51c6\u786e\u7684\u67e5\u8be2\u7ed3\u679c\u3002\u5982\u679cDNS\u670d\u52a1\u5668\u672c\u5730\u6ca1\u6709\u5b58\u50a8\u4e0e\u4e4b\u5bf9\u5e94\u7684\u4fe1\u606f\uff0c\u5219\u8be5\u670d\u52a1\u5668\u9700\u8981\u8be2\u95ee\u5176\u4ed6\u670d\u52a1\u5668\uff0c\u5e76\u5c06\u8fd4\u56de\u7684\u67e5\u8be2\u7ed3\u679c\u63d0\u4ea4\u7ed9\u7528\u6237\u3002\u800c\u8fed\u4ee3\u67e5\u8be2\u5219\u662f\u6307\uff0cDNS\u670d\u52a1\u5668\u5728\u6536\u5230\u7528\u6237\u53d1\u8d77\u7684\u8bf7\u6c42\u65f6\uff0c\u5e76\u4e0d\u76f4\u63a5\u56de\u590d\u67e5\u8be2\u7ed3\u679c\uff0c\u800c\u662f\u544a\u8bc9\u53e6\u4e00\u53f0DNS\u670d\u52a1\u5668\u7684\u5730\u5740\uff0c\u7528\u6237\u518d\u5411\u8fd9\u53f0DNS\u670d\u52a1\u5668\u63d0\u4ea4\u8bf7\u6c42\uff0c\u8fd9\u6837\u4f9d\u6b21\u53cd\u590d\uff0c\u76f4\u5230\u8fd4\u56de\u67e5\u8be2\u7ed3\u679c\u3002<\/p>\n \u7531\u6b64\u53ef\u89c1\uff0c\u5f53\u7528\u6237\u5411\u5c31\u8fd1\u7684\u4e00\u53f0DNS\u670d\u52a1\u5668\u53d1\u8d77\u5bf9\u67d0\u4e2a\u57df\u540d\u7684\u67e5\u8be2\u8bf7\u6c42\u4e4b\u540e\uff08\u8fd9\u91cc\u4ee5q13zd.cn<\/a>\u4e3a\u4f8b\uff09\uff0c\u5176\u67e5\u8be2\u6d41\u7a0b\u5927\u81f4\u5982\u56fe13-2\u6240\u793a\u3002<\/p>\n <\/p>\n \u56fe13-2\u00a0 \u5411DNS\u670d\u52a1\u5668\u53d1\u8d77\u57df\u540d\u67e5\u8be2\u8bf7\u6c42\u7684\u6d41\u7a0b<\/p>\n \u5f53\u7528\u6237\u5411\u7f51\u7edc\u6307\u5b9a\u7684DNS\u670d\u52a1\u5668\u53d1\u8d77\u4e00\u4e2a\u57df\u540d\u8bf7\u6c42\u65f6\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\u4f1a\u6709\u672c\u5730DNS\u670d\u52a1\u5668\u5411\u4e0a\u7ea7\u7684DNS\u670d\u52a1\u5668\u53d1\u9001\u8fed\u4ee3\u67e5\u8be2\u8bf7\u6c42\uff1b\u5982\u679c\u8be5DNS\u670d\u52a1\u5668\u6ca1\u6709\u8981\u67e5\u8be2\u7684\u4fe1\u606f\uff0c\u5219\u4f1a\u8fdb\u4e00\u6b65\u5411\u4e0a\u7ea7DNS\u670d\u52a1\u5668\u53d1\u9001\u8fed\u4ee3\u67e5\u8be2\u8bf7\u6c42\uff0c\u76f4\u5230\u83b7\u5f97\u51c6\u786e\u7684\u67e5\u8be2\u7ed3\u679c\u4e3a\u6b62\u3002\u5176\u4e2d\u6700\u9ad8\u7ea7\u3001\u6700\u6743\u5a01\u7684\u6839DNS\u670d\u52a1\u5668\u603b\u5171\u670913\u53f0\uff0c\u5206\u5e03\u5728\u4e16\u754c\u5404\u5730\uff0c\u5176\u7ba1\u7406\u5355\u4f4d\u3001\u5177\u4f53\u7684\u5730\u7406\u4f4d\u7f6e\uff0c\u4ee5\u53caIP\u5730\u5740\u5982\u886813-1\u6240\u793a\u3002<\/p>\n \u886813-1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13\u53f0\u6839DNS\u670d\u52a1\u5668\u7684\u5177\u4f53\u4fe1\u606f<\/p>\n <\/p>\n \u8fd9\u91cc\u63d0\u5230\u768413\u53f0\u6839\u57df\u670d\u52a1\u5668\u5e76\u975e\u771f\u7684\u53ea\u670913\u53f0\u670d\u52a1\u5668\uff0c\u6ca1\u6709\u54ea\u53f0\u670d\u52a1\u5668\u80fd\u72ec\u7acb\u627f\u53d7\u4f4f\u5982\u6b64\u5927\u7684\u8bf7\u6c42\u91cf\uff0c\u8fd9\u662f\u6280\u672f\u5708\u4e60\u60ef\u7684\u53eb\u6cd5\u800c\u5df2\u3002\u5b9e\u9645\u4e0a\u7528\u4e8e\u6839\u57df\u540d\u7684\u670d\u52a1\u5668\u603b\u5171\u6709504\u53f0\uff0c\u5b83\u4eec\u4eceA\u5230M\u8fdb\u884c\u4e86\u6392\u5e8f\uff0c\u5e76\u5171\u752813\u4e2aIP\u5730\u5740\uff0c\u4ee5\u6b64\u8fdb\u884c\u8d1f\u8f7d\u5747\u8861\uff0c\u4ee5\u62b5\u6297\u5206\u5e03\u5f0f\u62d2\u7edd\u670d\u52a1\uff08DDoS\uff09\u653b\u51fb\u3002<\/p>\n<\/div>\n<\/div>\n \u968f\u7740\u4e92\u8054\u7f51\u63a5\u5165\u8bbe\u5907\u6570\u91cf\u7684\u589e\u957f\uff0c\u539f\u6709\u7684IPv4\u4f53\u7cfb\u5df2\u7ecf\u4e0d\u80fd\u6ee1\u8db3\u9700\u6c42\uff0cIPv6\u534f\u8bae\u5728\u5168\u7403\u5f00\u59cb\u666e\u53ca\u3002\u57fa\u4e8eIPv6\u7684\u65b0\u578b\u5730\u5740\u7ed3\u6784\u4e3a\u65b0\u589e\u6839\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u5951\u673a\u3002\u6211\u56fd\u7684\u201c\u4e0b\u4e00\u4ee3\u4e92\u8054\u7f51\u56fd\u5bb6\u5de5\u7a0b\u4e2d\u5fc3\u201d\u4e8e2013\u5e74\u8054\u5408\u65e5\u672c\u3001\u7f8e\u56fd\u76f8\u5173\u8fd0\u8425\u673a\u6784\u548c\u4e13\u4e1a\u4eba\u58eb\u53d1\u8d77\u201c\u96ea\u4eba\u8ba1\u5212\u201d\uff0c\u63d0\u51fa\u4ee5IPv6\u4e3a\u57fa\u7840\u3001\u9762\u5411\u65b0\u5174\u5e94\u7528\u3001\u81ea\u4e3b\u53ef\u63a7\u7684\u4e00\u6574\u5957\u6839\u670d\u52a1\u5668\u89e3\u51b3\u65b9\u6848\u548c\u6280\u672f\u4f53\u7cfb\uff0c\u5e76\u4e8e2017\u5e7411\u6708\u5728\u5168\u7403\u5b8c\u621025\u53f0IPv6\u6839\u670d\u52a1\u5668\u7684\u67b6\u8bbe\uff08\u6211\u56fd\u90e8\u7f72\u4e86\u5176\u4e2d\u76844\u53f0\uff0c\u6253\u7834\u4e86\u6211\u56fd\u8fc7\u53bb\u6ca1\u6709\u6839\u670d\u52a1\u5668\u7684\u56f0\u5883\uff09\u3002<\/p>\n BIND\uff08Berkeley Internet Name Domain\uff0c\u4f2f\u514b\u5229\u56e0\u7279\u7f51\u540d\u79f0\u57df\uff09\u670d\u52a1\u662f\u5168\u7403\u8303\u56f4\u5185\u4f7f\u7528\u6700\u5e7f\u6cdb\u3001\u6700\u5b89\u5168\u53ef\u9760\u4e14\u9ad8\u6548\u7684\u57df\u540d\u89e3\u6790\u670d\u52a1\u7a0b\u5e8f\u3002DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u4f5c\u4e3a\u4e92\u8054\u7f51\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\uff0c\u5176\u8d23\u4efb\u4e4b\u91cd\u53ef\u60f3\u800c\u77e5\uff0c\u56e0\u6b64\u5efa\u8bae\u5927\u5bb6\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u5b89\u88c5\u90e8\u7f72bind\u670d\u52a1\u7a0b\u5e8f\u65f6\u52a0\u4e0achroot\uff08\u4fd7\u79f0\u7262\u7b3c\u673a\u5236\uff09\u6269\u5c55\u5305\uff0c\u4ee5\u4fbf\u6709\u6548\u5730\u9650\u5236bind\u670d\u52a1\u7a0b\u5e8f\u4ec5\u80fd\u5bf9\u81ea\u8eab\u7684\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u64cd\u4f5c\uff0c\u4ee5\u786e\u4fdd\u6574\u4e2a\u670d\u52a1\u5668\u7684\u5b89\u5168\u3002<\/p>\n \u4ece\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\u53ef\u4ee5\u770b\u5230\uff0c\u4f5c\u4e3a\u4e3b\u7a0b\u5e8f\u7684bind\u67092.1MB\uff0c\u800c\u4f5c\u4e3a\u5b89\u5168\u63d2\u4ef6\u7684bind-chroot\u4ec5\u670999KB\u3002<\/p>\n bind\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u5e76\u4e0d\u7b80\u5355\uff0c\u56e0\u4e3a\u8981\u60f3\u4e3a\u7528\u6237\u63d0\u4f9b\u5065\u5168\u7684DNS\u67e5\u8be2\u670d\u52a1\uff0c\u8981\u5728\u672c\u5730\u4fdd\u5b58\u76f8\u5173\u7684\u57df\u540d\u6570\u636e\u5e93\uff0c\u800c\u5982\u679c\u628a\u6240\u6709\u57df\u540d\u548cIP\u5730\u5740\u7684\u5bf9\u5e94\u5173\u7cfb\u90fd\u5199\u5165\u5230\u67d0\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4f30\u8ba1\u8981\u6709\u4e0a\u5343\u4e07\u6761\u7684\u53c2\u6570\uff0c\u8fd9\u6837\u65e2\u4e0d\u5229\u4e8e\u7a0b\u5e8f\u7684\u6267\u884c\u6548\u7387\uff0c\u4e5f\u4e0d\u65b9\u4fbf\u65e5\u540e\u7684\u4fee\u6539\u548c\u7ef4\u62a4\u3002\u56e0\u6b64\u5728bind\u670d\u52a1\u7a0b\u5e8f\u4e2d\u6709\u4e0b\u9762\u8fd93\u4e2a\u6bd4\u8f83\u5173\u952e\u7684\u6587\u4ef6\u3002<\/p>\n \u4e3b\u914d\u7f6e\u6587\u4ef6\uff08\/etc\/named.conf\uff09<\/strong>\uff1a\u53ea\u670959\u884c\uff0c\u800c\u4e14\u5728\u53bb\u9664\u6ce8\u91ca\u4fe1\u606f\u548c\u7a7a\u884c\u4e4b\u540e\uff0c\u5b9e\u9645\u6709\u6548\u7684\u53c2\u6570\u4ec5\u670930\u884c\u5de6\u53f3\uff0c\u8fd9\u4e9b\u53c2\u6570\u7528\u6765\u5b9a\u4e49bind\u670d\u52a1\u7a0b\u5e8f\u7684\u8fd0\u884c\u3002<\/p>\n \u533a\u57df\u914d\u7f6e\u6587\u4ef6\uff08\/etc\/named.rfc1912.zones\uff09<\/strong>\uff1a\u7528\u6765\u4fdd\u5b58\u57df\u540d\u548cIP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u7684\u6240\u5728\u4f4d\u7f6e\u3002\u7c7b\u4f3c\u4e8e\u56fe\u4e66\u7684\u76ee\u5f55\uff0c\u5bf9\u5e94\u7740\u6bcf\u4e2a\u57df\u548c\u76f8\u5e94IP\u5730\u5740\u6240\u5728\u7684\u5177\u4f53\u4f4d\u7f6e\uff0c\u5f53\u9700\u8981\u67e5\u770b\u6216\u4fee\u6539\u65f6\uff0c\u53ef\u6839\u636e\u8fd9\u4e2a\u4f4d\u7f6e\u627e\u5230\u76f8\u5173\u6587\u4ef6\u3002<\/p>\n \u6570\u636e\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\uff08\/var\/named\uff09<\/strong>\uff1a\u8be5\u76ee\u5f55\u7528\u6765\u4fdd\u5b58\u57df\u540d\u548cIP\u5730\u5740\u771f\u5b9e\u5bf9\u5e94\u5173\u7cfb\u7684\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u3002<\/p><\/blockquote>\n \u5728Linux\u7cfb\u7edf\u4e2d\uff0cbind\u670d\u52a1\u7a0b\u5e8f\u7684\u540d\u79f0\u4e3anamed\u3002\u9996\u5148\u9700\u8981\u5728\/etc\u76ee\u5f55\u4e2d\u627e\u5230\u8be5\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u628a\u7b2c11\u884c\u548c\u7b2c19\u884c\u7684\u5730\u5740\u5747\u4fee\u6539\u4e3aany\uff0c\u5206\u522b\u8868\u793a\u670d\u52a1\u5668\u4e0a\u7684\u6240\u6709IP\u5730\u5740\u5747\u53ef\u63d0\u4f9bDNS\u57df\u540d\u89e3\u6790\u670d\u52a1\uff0c\u4ee5\u53ca\u5141\u8bb8\u6240\u6709\u4eba\u5bf9\u672c\u670d\u52a1\u5668\u53d1\u9001DNS\u67e5\u8be2\u8bf7\u6c42\u3002\u8fd9\u4e24\u4e2a\u5730\u65b9\u4e00\u5b9a\u8981\u4fee\u6539\u51c6\u786e\u3002<\/p>\n \u5982\u524d\u6240\u8ff0\uff0cbind\u670d\u52a1\u7a0b\u5e8f\u7684\u533a\u57df\u914d\u7f6e\u6587\u4ef6\uff08\/etc\/named.rfc1912.zones\uff09\u7528\u6765\u4fdd\u5b58\u57df\u540d\u548cIP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u7684\u6240\u5728\u4f4d\u7f6e\u3002\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5b9a\u4e49\u4e86\u57df\u540d\u4e0eIP\u5730\u5740\u89e3\u6790\u89c4\u5219\u4fdd\u5b58\u7684\u6587\u4ef6\u4f4d\u7f6e\u4ee5\u53ca\u670d\u52a1\u7c7b\u578b\u7b49\u5185\u5bb9\uff0c\u800c\u6ca1\u6709\u5305\u542b\u5177\u4f53\u7684\u57df\u540d\u3001IP\u5730\u5740\u5bf9\u5e94\u5173\u7cfb\u7b49\u4fe1\u606f\u3002\u670d\u52a1\u7c7b\u578b\u67093\u79cd\uff0c\u5206\u522b\u4e3ahint\uff08\u6839\u533a\u57df\uff09\u3001master\uff08\u4e3b\u533a\u57df\uff09\u3001slave\uff08\u8f85\u52a9\u533a\u57df\uff09\uff0c\u5176\u4e2d\u5e38\u7528\u7684master\u548cslave\u6307\u7684\u5c31\u662f\u4e3b\u670d\u52a1\u5668\u548c\u4ece\u670d\u52a1\u5668\u3002\u5c06\u57df\u540d\u89e3\u6790\u4e3aIP\u5730\u5740\u7684\u6b63\u5411\u89e3\u6790\u53c2\u6570\u548c\u5c06IP\u5730\u5740\u89e3\u6790\u4e3a\u57df\u540d\u7684\u53cd\u5411\u89e3\u6790\u53c2\u6570\u5206\u522b\u5982\u56fe13-3\u548c\u56fe13-4\u6240\u793a\u3002<\/p>\n <\/p>\n \u56fe13-3\u00a0\u6b63\u5411\u89e3\u6790\u53c2\u6570<\/p>\n <\/p>\n \u56fe13-4 \u53cd\u5411\u89e3\u6790\u53c2\u6570<\/p>\n \u4e0b\u9762\u7684\u5b9e\u9a8c\u4e2d\u4f1a\u5206\u522b\u4fee\u6539bind\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u3001\u533a\u57df\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u3002\u5982\u679c\u5728\u5b9e\u9a8c\u4e2d\u9047\u5230\u4e86bind\u670d\u52a1\u7a0b\u5e8f\u542f\u52a8\u5931\u8d25\u7684\u60c5\u51b5\uff0c\u800c\u60a8\u8ba4\u4e3a\u8fd9\u662f\u7531\u4e8e\u53c2\u6570\u5199\u9519\u800c\u5bfc\u81f4\u7684\uff0c\u5219\u53ef\u4ee5\u6267\u884cnamed-checkconf\u547d\u4ee4<\/a>\u548cnamed-checkzone\u547d\u4ee4<\/a>\uff0c\u5206\u522b\u68c0\u67e5\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bed\u6cd5\u6216\u53c2\u6570\u7684\u9519\u8bef\u3002<\/p>\n \u5728DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u4e2d\uff0c\u6b63\u5411\u89e3\u6790\u662f\u6307\u6839\u636e\u57df\u540d\uff08\u4e3b\u673a\u540d\uff09\u67e5\u627e\u5230\u5bf9\u5e94\u7684IP\u5730\u5740\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5f53\u7528\u6237\u8f93\u5165\u4e86\u4e00\u4e2a\u57df\u540d\u540e\uff0cbind\u670d\u52a1\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u8fdb\u884c\u67e5\u627e\uff0c\u5e76\u5c06\u5339\u914d\u5230\u7684IP\u5730\u5740\u8fd4\u7ed9\u7528\u6237\uff0c\u5982\u56fe13-5\u6240\u793a\u3002\u8fd9\u4e5f\u662f\u6700\u5e38\u7528\u7684DNS\u5de5\u4f5c\u6a21\u5f0f\u3002<\/p>\n <\/p>\n \u56fe13-5 \u6b63\u5411\u89e3\u6790\u6280\u672f\u793a\u610f\u56fe<\/p>\n \u7b2c1\u6b65<\/strong>\uff1a\u7f16\u8f91\u533a\u57df\u914d\u7f6e\u6587\u4ef6\u3002\u8be5\u6587\u4ef6\u4e2d\u9ed8\u8ba4\u5df2\u7ecf\u6709\u4e86\u4e00\u4e9b\u65e0\u5173\u7d27\u8981\u7684\u89e3\u6790\u53c2\u6570\uff0c\u65e8\u5728\u8ba9\u7528\u6237\u6709\u4e00\u4e2a\u53c2\u8003\u3002\u53ef\u4ee5\u5c06\u4e0b\u9762\u7684\u53c2\u6570\u6dfb\u52a0\u5230\u533a\u57df\u914d\u7f6e\u6587\u4ef6\u7684\u6700\u4e0b\u9762\u3002\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u5c06\u8be5\u6587\u4ef6\u4e2d\u7684\u539f\u6709\u4fe1\u606f\u5168\u90e8\u6e05\u7a7a\uff0c\u800c\u53ea\u4fdd\u7559\u81ea\u5df1\u7684\u57df\u540d\u89e3\u6790\u4fe1\u606f\u3002<\/p>\n \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u4ee3\u7801\u7f29\u8fdb\u4ec5\u662f\u4e3a\u4e86\u63d0\u5347\u9605\u8bfb\u4f53\u9a8c\uff0c\u6709\u65e0\u7f29\u8fdb\u5bf9\u53c2\u6570\u6548\u679c\u5747\u6ca1\u6709\u4efb\u4f55\u5f71\u54cd\u3002<\/p>\n<\/div>\n<\/div>\n \u7b2c2\u6b65<\/strong>\uff1a\u7f16\u8f91\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u3002\u53ef\u4ee5\u4ece\/var\/named\u76ee\u5f55\u4e2d\u590d\u5236\u4e00\u4efd\u6b63\u5411\u89e3\u6790\u7684\u6a21\u677f\u6587\u4ef6\uff08named.localhost\uff09\uff0c\u7136\u540e\u628a\u57df\u540d\u548cIP\u5730\u5740\u7684\u5bf9\u5e94\u6570\u636e\u586b\u5199\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u4e2d\u5e76\u4fdd\u5b58\u3002\u5728\u590d\u5236\u65f6\u8bb0\u5f97\u52a0\u4e0a-a\u53c2\u6570\uff0c\u8fd9\u53ef\u4ee5\u4fdd\u7559\u539f\u59cb\u6587\u4ef6\u7684\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u3001\u6743\u9650\u5c5e\u6027\u7b49\u4fe1\u606f\uff0c\u4ee5\u4fbf\u8ba9bind\u670d\u52a1\u7a0b\u5e8f\u987a\u5229\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n \u5728\u4fdd\u5b58\u5e76\u9000\u51fa\u540e\u6587\u4ef6\u540e\u8bb0\u5f97\u91cd\u542fnamed\u670d\u52a1\u7a0b\u5e8f\uff0c\u8ba9\u65b0\u7684\u89e3\u6790\u6570\u636e\u751f\u6548\u3002\u8003\u8651\u5230\u6b63\u5411\u89e3\u6790\u6587\u4ef6\u4e2d\u7684\u53c2\u6570\u8f83\u591a\uff0c\u800c\u4e14\u76f8\u5bf9\u90fd\u6bd4\u8f83\u91cd\u8981\uff0c\u5218\u9044\u8001\u5e08\u5728\u6bcf\u4e2a\u53c2\u6570\u540e\u9762\u90fd\u4f5c\u4e86\u7b80\u8981\u7684\u8bf4\u660e\u3002<\/p>\n <\/p>\n \u5728\u89e3\u6790\u6587\u4ef6\u4e2d\uff0cA\u8bb0\u5f55\u7c7b\u578b\u8868\u793a\u5c06\u57df\u540d\u6307\u5411\u4e00\u4e2aIPv4\u5730\u5740\uff0c\u800cAAAA\u8868\u793a\u5c06\u57df\u540d\u6307\u5411\u4e00\u4e2aIPv6\u5730\u5740\u3002\u6b64\u5916\uff0c\u8fd8\u67098\u79cd\u8bb0\u5f55\u7c7b\u578b\uff0c\u5982\u886813-2\u6240\u793a\uff0c\u4f9b\u5404\u4f4d\u8bfb\u8005\u65e5\u540e\u5907\u67e5\uff1a<\/p>\n \u886813-2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u57df\u540d\u89e3\u6790\u8bb0\u5f55\u7c7b\u578b<\/p>\n \u7b2c3\u6b65<\/strong>\uff1a\u68c0\u9a8c\u89e3\u6790\u7ed3\u679c\u3002\u4e3a\u4e86\u68c0\u9a8c\u89e3\u6790\u7ed3\u679c\uff0c\u4e00\u5b9a\u8981\u5148\u628aLinux\u7cfb\u7edf\u7f51\u5361\u4e2d\u7684DNS\u5730\u5740\u53c2\u6570\u4fee\u6539\u6210\u672c\u673aIP\u5730\u5740\uff08\u89c1\u56fe13-6\uff09\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528\u7531\u672c\u673a\u63d0\u4f9b\u7684DNS\u67e5\u8be2\u670d\u52a1\u4e86\u3002nslookup\u547d\u4ee4\u7528\u4e8e\u68c0\u6d4b\u80fd\u5426\u4eceDNS\u670d\u52a1\u5668\u4e2d\u67e5\u8be2\u5230\u57df\u540d\u4e0eIP\u5730\u5740\u7684\u89e3\u6790\u8bb0\u5f55\uff0c\u8fdb\u800c\u66f4\u51c6\u786e\u5730\u68c0\u9a8cDNS\u670d\u52a1\u5668\u662f\u5426\u5df2\u7ecf\u80fd\u591f\u4e3a\u7528\u6237\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n <\/p>\n \u56fe13-6 \u914d\u7f6e\u7f51\u5361DNS\u53c2\u6570\u4fe1\u606f<\/p>\n \u82e5\u89e3\u6790\u51fa\u7684\u7ed3\u679c\u4e0d\u662f192.168.10.10\uff0c\u5219\u5f88\u6709\u53ef\u80fd\u662f\u865a\u62df\u673a\u9009\u62e9\u4e86\u8054\u7f51\u6a21\u5f0f\uff0c\u5e76\u7531\u4e92\u8054\u7f51DNS\u670d\u52a1\u5668\u8fdb\u884c\u4e86\u89e3\u6790\u3002\u6b64\u65f6\u5e94\u786e\u8ba4\u670d\u52a1\u5668\u4fe1\u606f\u662f\u5426\u4e3a\u201cAddress: 192.168.10.10#53\u201d\uff0c\u5373\u7531\u672c\u5730\u670d\u52a1\u5668192.168.10.10\u768453\u7aef\u53e3\u53f7\u8fdb\u884c\u89e3\u6790\uff1b\u82e5\u4e0d\u662f\uff0c\u5219\u91cd\u542f\u7f51\u7edc\u540e\u518d\u8bd5\u4e00\u4e0b\u3002<\/p>\n \u5728DNS\u57df\u540d\u89e3\u6790\u670d\u52a1\u4e2d\uff0c\u53cd\u5411\u89e3\u6790\u7684\u4f5c\u7528\u662f\u5c06\u7528\u6237\u63d0\u4ea4\u7684IP\u5730\u5740\u89e3\u6790\u4e3a\u5bf9\u5e94\u7684\u57df\u540d\u4fe1\u606f\uff0c\u5b83\u4e00\u822c\u7528\u4e8e\u5bf9\u67d0\u4e2aIP\u5730\u5740\u4e0a\u7ed1\u5b9a\u7684\u6240\u6709\u57df\u540d\u8fdb\u884c\u6574\u4f53\u5c4f\u853d\uff0c\u5c4f\u853d\u7531\u67d0\u4e9b\u57df\u540d\u53d1\u9001\u7684\u5783\u573e\u90ae\u4ef6\u3002\u5b83\u4e5f\u53ef\u4ee5\u9488\u5bf9\u67d0\u4e2aIP\u5730\u5740\u8fdb\u884c\u53cd\u5411\u89e3\u6790\uff0c\u5927\u81f4\u5224\u65ad\u51fa\u6709\u591a\u5c11\u4e2a\u7f51\u7ad9\u8fd0\u884c\u5728\u4e0a\u9762\u3002\u5f53\u8d2d\u4e70\u865a\u62df\u4e3b\u673a\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e00\u529f\u80fd\u9a8c\u8bc1\u865a\u62df\u4e3b\u673a\u63d0\u4f9b\u5546\u662f\u5426\u6709\u4e25\u91cd\u7684\u8d85\u552e\u95ee\u9898\u3002\u56fe13-7\u6240\u793a\u4e3a\u5bf9IP\u5730\u5740\u6240\u5173\u8054\u7684\u57df\u540d\u4fe1\u606f\u8fdb\u884c\u53cd\u63a8\u3002<\/p>\n <\/p>\n \u56fe13-7 \u53cd\u5411\u89e3\u6790\u6280\u672f\u793a\u610f\u56fe<\/p>\n \u7b2c1\u6b65<\/strong>\uff1a\u7f16\u8f91\u533a\u57df\u914d\u7f6e\u6587\u4ef6\u3002\u5728\u7f16\u8f91\u8be5\u6587\u4ef6\u65f6\uff0c\u9664\u4e86\u4e0d\u8981\u5199\u9519\u683c\u5f0f\u4e4b\u5916\uff0c\u8fd8\u9700\u8981\u8bb0\u4f4f\u6b64\u5904\u5b9a\u4e49\u7684\u6570\u636e\u914d\u7f6e\u6587\u4ef6\u540d\u79f0\uff0c\u56e0\u4e3a\u4e00\u4f1a\u513f\u8fd8\u9700\u8981\u5728\/var\/named\u76ee\u5f55\u4e2d\u5efa\u7acb\u4e0e\u5176\u5bf9\u5e94\u7684\u540c\u540d\u6587\u4ef6\u3002\u53cd\u5411\u89e3\u6790\u662f\u628aIP\u5730\u5740\u89e3\u6790\u6210\u57df\u540d\u683c\u5f0f\uff0c\u56e0\u6b64\u5728\u5b9a\u4e49zone\uff08\u533a\u57df\uff09\u65f6\u5e94\u8be5\u8981\u628aIP\u5730\u5740\u53cd\u5199\uff0c\u6bd4\u5982\u539f\u6765\u662f192.168.10.0\uff0c\u53cd\u5199\u540e\u5e94\u8be5\u5c31\u662f10.168.192\uff0c\u800c\u4e14\u53ea\u9700\u5199\u51faIP\u5730\u5740\u7684\u7f51\u7edc\u4f4d\u5373\u53ef\u3002\u628a\u4e0b\u5217\u53c2\u6570\u6dfb\u52a0\u81f3\u6b63\u5411\u89e3\u6790\u53c2\u6570\u7684\u540e\u9762\u3002<\/p>\n13.1 DNS\u57df\u540d\u89e3\u6790\u670d\u52a1<\/strong><\/span><\/h5>\n
\n\n
\n \u540d\u79f0<\/td>\n \u7ba1\u7406\u5355\u4f4d<\/td>\n \u5730\u7406\u4f4d\u7f6e<\/td>\n IP\u5730\u5740<\/td>\n<\/tr>\n \n A<\/td>\n Verisign\u516c\u53f8<\/td>\n \u7f8e\u56fd-\u5f17\u5409\u5c3c\u4e9a\u5dde<\/td>\n 198.41.0.4<\/td>\n<\/tr>\n \n B<\/td>\n \u5357\u52a0\u5dde\u5927\u5b66\u4fe1\u606f\u79d1\u5b66\u7814\u7a76\u6240<\/td>\n \u7f8e\u56fd-\u52a0\u5229\u798f\u5c3c\u4e9a\u5dde<\/td>\n 199.9.14.201<\/td>\n<\/tr>\n \n C<\/td>\n Cogent\u901a\u4fe1\u516c\u53f8<\/td>\n \u7f8e\u56fd-\u5f17\u5409\u5c3c\u4e9a\u5dde<\/td>\n 192.33.4.12<\/td>\n<\/tr>\n \n D<\/td>\n \u9a6c\u91cc\u5170\u5927\u5b66<\/td>\n \u7f8e\u56fd-\u9a6c\u91cc\u5170\u5dde<\/td>\n 199.7.91.13<\/td>\n<\/tr>\n \n E<\/td>\n \u7f8e\u56fd\u822a\u7a7a\u822a\u5929\u5c40<\/td>\n \u7f8e\u56fd-\u52a0\u5229\u798f\u5c3c\u4e9a\u5dde<\/td>\n 192.203.230.10<\/td>\n<\/tr>\n \n F<\/td>\n \u4e92\u8054\u7f51\u7cfb\u7edf\u534f\u4f1a (ISC)<\/td>\n \u7f8e\u56fd-\u52a0\u5229\u798f\u5c3c\u4e9a\u5dde<\/td>\n 192.5.5.241<\/td>\n<\/tr>\n \n G<\/td>\n \u7f8e\u56fd\u56fd\u9632\u90e8\u7f51\u7edc\u4fe1\u606f\u4e2d\u5fc3 (NIC)<\/td>\n \u7f8e\u56fd-\u5f17\u5409\u5c3c\u4e9a\u5dde<\/td>\n 192.112.36.4<\/td>\n<\/tr>\n \n H<\/td>\n \u7f8e\u56fd\u9646\u519b\u7814\u7a76\u5b9e\u9a8c\u5ba4<\/td>\n \u7f8e\u56fd-\u9a6c\u91cc\u5170\u5dde<\/td>\n 198.97.190.53<\/td>\n<\/tr>\n \n I<\/td>\n Netnod\u516c\u53f8<\/td>\n \u745e\u5178-\u65af\u5fb7\u54e5\u5c14\u6469<\/td>\n 192.36.148.17<\/td>\n<\/tr>\n \n J<\/td>\n Verisign\u516c\u53f8<\/td>\n \u7f8e\u56fd-\u5f17\u5409\u5c3c\u4e9a\u5dde<\/td>\n 192.58.128.30<\/td>\n<\/tr>\n \n K<\/td>\n RIPE\u7f51\u7edc\u534f\u8c03\u4e2d\u5fc3<\/td>\n \u82f1\u56fd-\u4f26\u6566<\/td>\n 193.0.14.129<\/td>\n<\/tr>\n \n L<\/td>\n \u4e92\u8054\u7f51\u540d\u79f0\u4e0e\u6570\u5b57\u5730\u5740\u5206\u914d\u673a\u6784 (ICANN)<\/td>\n \u7f8e\u56fd-\u5f17\u5409\u5c3c\u4e9a\u5dde<\/td>\n 199.7.83.42<\/td>\n<\/tr>\n \n M<\/td>\n WIDE\u9879\u76ee<\/td>\n \u65e5\u672c-\u4e1c\u4eac<\/td>\n 202.12.27.33<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Tips<\/strong><\/h3>\n<\/div>\n
13.2 \u5b89\u88c5Bind\u670d\u52a1\u7a0b\u5e8f<\/strong><\/span><\/h5>\n
[root@linuxprobe ~]# yum install bind-chroot\r\nLoaded plugins: langpacks, product-id, subscription-manager\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nAppStream 3.1 MB\/s | 3.2 kB 00:00 \r\nBaseOS 2.7 MB\/s | 2.7 kB 00:00 \r\nDependencies resolved.\r\n========================================================================================\r\n Package Arch Version Repository Size\r\n========================================================================================\r\nInstalling:\r\n bind-chroot x86_64 32:9.11.4-16.P2.el8 AppStream 99 k\r\nInstalling dependencies:\r\n bind x86_64 32:9.11.4-16.P2.el8 AppStream 2.1 M\r\n\r\nTransaction Summary\r\n========================================================================================\r\nInstall 2 Packages\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\nInstalled:\r\n bind-chroot-32:9.11.4-16.P2.el8.x86_64 bind-32:9.11.4-16.P2.el8.x86_64 \r\n\r\nComplete!<\/pre>\n
[root@linuxprobe ~]# vim \/etc\/named.conf\r\n 1 \/\/\r\n 2 \/\/ named.conf\r\n 3 \/\/\r\n 4 \/\/ Provided by Red Hat bind package to configure the ISC BIND named(8) DNS\r\n 5 \/\/ server as a caching only nameserver (as a localhost DNS resolver only).\r\n 6 \/\/\r\n 7 \/\/ See \/usr\/share\/doc\/bind*\/sample\/ for example named configuration files.\r\n 8 \/\/\r\n 9 \r\n 10 options {\r\n 11 listen-on port 53 { any; };<\/strong>\r\n 12 listen-on-v6 port 53 { ::1; };\r\n 13 directory \"\/var\/named\";\r\n 14 dump-file \"\/var\/named\/data\/cache_dump.db\";\r\n 15 statistics-file \"\/var\/named\/data\/named_stats.txt\";\r\n 16 memstatistics-file \"\/var\/named\/data\/named_mem_stats.txt\";\r\n 17 secroots-file \"\/var\/named\/data\/named.secroots\";\r\n 18 recursing-file \"\/var\/named\/data\/named.recursing\";\r\n 19 allow-query { any; };<\/strong>\r\n 20 \r\n 21 \/* \r\n 22 - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.\r\n 23 - If you are building a RECURSIVE (caching) DNS server, you need to enable \r\n 24 recursion. \r\n 25 - If your recursive DNS server has a public IP address, you MUST enable access \r\n 26 control to limit queries to your legitimate users. Failing to do so will\r\n 27 cause your server to become part of large scale DNS amplification \r\n 28 attacks. Implementing BCP38 within your network would greatly\r\n 29 reduce such attack surface \r\n 30 *\/\r\n 31 recursion yes;\r\n 32 \r\n 33 dnssec-enable yes;\r\n 34 dnssec-validation yes;\r\n 35 \r\n 36 managed-keys-directory \"\/var\/named\/dynamic\";\r\n 37 \r\n 38 pid-file \"\/run\/named\/named.pid\";\r\n 39 session-keyfile \"\/run\/named\/session.key\";\r\n 40 \r\n 41 \/* https:\/\/fedoraproject.org\/wiki\/Changes\/CryptoPolicy *\/\r\n 42 include \"\/etc\/crypto-policies\/back-ends\/bind.config\";\r\n 43 };\r\n 44 \r\n 45 logging {\r\n 46 channel default_debug {\r\n 47 file \"data\/named.run\";\r\n 48 severity dynamic;\r\n 49 };\r\n 50 };\r\n 51 \r\n 52 zone \".\" IN {\r\n 53 type hint;\r\n 54 file \"named.ca\";\r\n 55 };\r\n 56 \r\n 57 include \"\/etc\/named.rfc1912.zones\";\r\n 58 include \"\/etc\/named.root.key\";\r\n 59 \r\n<\/pre>\n
13.2.1 \u6b63\u5411\u89e3\u6790\u5b9e\u9a8c<\/span><\/strong><\/h6>\n
[root@linuxprobe ~]# vim \/etc\/named.rfc1912.zones\r\nzone \"q13zd.cn\" IN {\r\n type master;\r\n file \"q13zd.cn.zone\";\r\n allow-update {none;};\r\n};\r\n<\/pre>\n
Tips<\/strong><\/h3>\n<\/div>\n
[root@linuxprobe ~]# cd \/var\/named\/\r\n[root@linuxprobe named]# ls -al named.localhost\r\n-rw-r-----. 1 root named 152 Jun 21 2007 named.localhost\r\n[root@linuxprobe named]# cp -a named.localhost q13zd.cn.zone\r\n<\/pre>\n
[root@linuxprobe named]# vim q13zd.cn.zone\r\n[root@linuxprobe named]# systemctl restart named\r\n[root@linuxprobe named]# systemctl enable named\r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/named.service \u2192 \/usr\/lib\/systemd\/system\/named.service.\r\n<\/pre>\n
\n\n
\n $TTL 1D<\/td>\n #\u751f\u5b58\u5468\u671f\u4e3a1\u5929<\/td>\n <\/td>\n <\/td>\n <\/td>\n <\/td>\n<\/tr>\n \n @<\/td>\n IN SOA<\/td>\n q13zd.cn.<\/td>\n root.q13zd.cn.<\/td>\n (<\/td>\n <\/td>\n<\/tr>\n \n <\/td>\n #\u6388\u6743\u4fe1\u606f\u5f00\u59cb:<\/td>\n #DNS\u533a\u57df\u7684\u5730\u5740<\/td>\n #\u57df\u540d\u7ba1\u7406\u5458\u7684\u90ae\u7bb1(\u4e0d\u8981\u7528@\u7b26\u53f7)<\/td>\n <\/td>\n<\/tr>\n \n <\/td>\n <\/td>\n <\/td>\n <\/td>\n 0;serial<\/td>\n #\u66f4\u65b0\u5e8f\u5217\u53f7<\/td>\n<\/tr>\n \n <\/td>\n <\/td>\n <\/td>\n <\/td>\n 1D;refresh<\/td>\n #\u66f4\u65b0\u65f6\u95f4<\/td>\n<\/tr>\n \n <\/td>\n <\/td>\n <\/td>\n <\/td>\n 1H;retry<\/td>\n #\u91cd\u8bd5\u5ef6\u65f6<\/td>\n<\/tr>\n \n <\/td>\n <\/td>\n <\/td>\n <\/td>\n 1W;expire<\/td>\n #\u5931\u6548\u65f6\u95f4<\/td>\n<\/tr>\n \n <\/td>\n <\/td>\n <\/td>\n <\/td>\n 3H );minimum<\/td>\n #\u65e0\u6548\u89e3\u6790\u8bb0\u5f55\u7684\u7f13\u5b58\u65f6\u95f4<\/td>\n<\/tr>\n \n <\/td>\n NS<\/td>\n ns.q13zd.cn.<\/td>\n #\u57df\u540d\u670d\u52a1\u5668\u8bb0\u5f55<\/td>\n<\/tr>\n \n ns<\/td>\n IN A<\/td>\n 192.168.10.10<\/td>\n #\u5730\u5740\u8bb0\u5f55(ns.q13zd.cn.)<\/td>\n<\/tr>\n \n www<\/td>\n IN A<\/td>\n 192.168.10.10<\/td>\n #\u5730\u5740\u8bb0\u5f55(q13zd.cn.)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \n\n
\n \u8bb0\u5f55\u7c7b\u578b<\/td>\n \u4f5c\u7528<\/td>\n<\/tr>\n \n A<\/td>\n \u5c06\u57df\u540d\u6307\u5411\u4e00\u4e2aIPV4\u5730\u5740<\/td>\n<\/tr>\n \n CNAME<\/td>\n \u5c06\u57df\u540d\u6307\u5411\u53e6\u5916\u4e00\u4e2a\u57df\u540d<\/td>\n<\/tr>\n \n AAAA<\/td>\n \u5c06\u57df\u540d\u6307\u5411\u4e00\u4e2aIPV6\u5730\u5740<\/td>\n<\/tr>\n \n NS<\/td>\n \u5c06\u5b50\u57df\u540d\u6307\u5b9a\u5176\u4ed6DNS\u670d\u52a1\u5668\u89e3\u6790<\/td>\n<\/tr>\n \n MX<\/td>\n \u5c06\u57df\u540d\u6307\u5411\u90ae\u4ef6\u670d\u52a1\u5668\u5730\u5740<\/td>\n<\/tr>\n \n SRV<\/td>\n \u8bb0\u5f55\u63d0\u4f9b\u7279\u5b9a\u7684\u670d\u52a1\u7684\u670d\u52a1\u5668<\/td>\n<\/tr>\n \n TXT<\/td>\n \u6587\u672c\u5185\u5bb9\u4e00\u822c\u4e3a512\u5b57\u8282\uff0c\u5e38\u4f5c\u4e3a\u53cd\u5783\u573e\u90ae\u4ef6\u7684SPF\u8bb0\u5f55<\/td>\n<\/tr>\n \n CAA<\/td>\n CA\u8bc1\u4e66\u529e\u6cd5\u673a\u6784\u6388\u6743\u6821\u9a8c<\/td>\n<\/tr>\n \n \u663e\u6027URL<\/td>\n \u5c06\u57df\u540d\u91cd\u5b9a\u5411\u5230\u53e6\u5916\u4e00\u4e2a\u5730\u5740<\/td>\n<\/tr>\n \n \u9690\u6027URL<\/td>\n \u4e0e\u663e\u6027URL\u7c7b\u578b\uff0c\u4f46\u662f\u4f1a\u9690\u85cf\u771f\u5b9e\u76ee\u6807\u5730\u5740<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n [root@linuxprobe named]# nmcli connection up ens160 \r\nConnection successfully activated (D-Bus active path: \/org\/freedesktop\/NetworkManager\/ActiveConnection\/4)\r\n[root@linuxprobe named]# nslookup\r\nName:\tq13zd.cn\r\nAddress: 192.168.10.10\r\n> ns.q13zd.cn\r\nServer:\t\t192.168.10.10\r\nAddress:\t192.168.10.10#53<\/span>\r\n\r\nName:\tns.q13zd.cn\r\nAddress: 192.168.10.10\r\n<\/pre>\n
13.2.2 \u53cd\u5411\u89e3\u6790\u5b9e\u9a8c<\/span><\/strong><\/h6>\n
[root@linuxprobe ~]# vim \/etc\/named.rfc1912.zones\r\nzone \"q13zd.cn\" IN {\r\n type master;\r\n file \"q13zd.cn.zone\";\r\n allow-update {none;};\r\n};\r\nzone \"10.168.192.in-addr.arpa\" IN {\r\n type master;\r\n file \"192.168.10.arpa\";\r\n allow-update {none;};\r\n};\r\n<\/pre>\n