{"id":6880,"date":"2021-03-24T14:47:14","date_gmt":"2021-03-24T06:47:14","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=6880"},"modified":"2021-07-24T10:55:28","modified_gmt":"2021-07-24T02:55:28","slug":"opnsense%e7%94%a8%e6%88%b7%e6%89%8b%e5%86%8c-dnsmasq-dns","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=6880","title":{"rendered":"OPNsense\u7528\u6237\u624b\u518c-Dnsmasq DNS"},"content":{"rendered":"<p style=\"text-align: justify;\">Dnsmasq\u662f\u4e00\u79cd\u8f7b\u578b\u3001\u5bb9\u6613\u914d\u7f6e\u7684DNS\u8f6c\u53d1\u5668\uff0c\u53ef\u7528\u4e8e\u7b54\u590d\u6765\u81ea\u7f51\u7edc\u7684dns\u67e5\u8be2\uff0cUnbound DNS\u4e5f\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u7684\u529f\u80fd\u3002<\/p>\n<p style=\"text-align: justify;\">\u81eaOPNsense 17.7\u5f00\u59cb\uff0cUnbound\u4e00\u76f4\u662fOPNsense\u7684\u6807\u51c6DNS\u670d\u52a1\uff0c\u4ecd\u4fdd\u7559Dnsmasq\u539f\u56e0\u4e3b\u8981\u662f\u8003\u8651\u517c\u5bb9\u6027\uff0c\u5efa\u8bae\u5927\u591a\u6570\u7528\u6237\u6700\u597d\u9009\u62e9Unbound\u3002<\/p>\n<div id=\"general-settings\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u5e38\u89c4\u9009\u9879<\/h1>\n<p>\u8fd9\u91cc\u7684\u8bbe\u7f6e\u7b80\u5355\u660e\u4e86\uff0c\u5f53\u4ece\u7f51\u7edc\u63a5\u6536\u5230\u670d\u52a1\u65f6\uff0c\u5b83\u5c31\u5f00\u59cb\u8f6c\u53d1dns\u8bf7\u6c42\u3002<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils align-default\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr class=\"row-odd\">\n<td>\u542f\u7528<\/td>\n<td>\u542f\u7528DNS\u8f6c\u53d1\u5668<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u4fa6\u542c\u7aef\u53e3<\/td>\n<td>\u7528\u4e8e\u54cd\u5e94DNS\u67e5\u8be2\u7684\u7aef\u53e3\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u7aef\u53e3\uff0853\uff09\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u7f51\u7edc\u63a5\u53e3<\/td>\n<td>\u8981\u4fa6\u542c\u7684\u63a5\u53e3\uff0c\u5728\u4f7f\u7528\u52a8\u6001\u63a5\u53e3\u65f6\uff0c\u5efa\u8bae\u4e0d\u8981\u7ed1\u5b9a\u5230\u8fd9\u4e9b\u63a5\u53e3\u7684\u5730\u5740\u3002[\u5168\u90e8]\u662f\u6807\u51c6\u914d\u7f6e\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528\u9632\u706b\u5899\u9650\u5236\u8bbf\u95ee\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u7ed1\u5b9a\u6a21\u5f0f<\/td>\n<td>\u63d0\u4f9b\u7f51\u7edc\u63a5\u53e3\u65f6\uff0c\u4ec5\u7ed1\u5b9a\u5230\u5305\u542b\u4e0a\u9762\u9009\u62e9\u7684IP\u5730\u5740\u7684\u63a5\u53e3\uff0c\u800c\u4e0d\u7ed1\u5b9a\u5230\u6240\u6709\u63a5\u53e3\u5e76\u4e22\u5f03\u5bf9\u5176\u4ed6\u5730\u5740\u7684\u67e5\u8be2\u3002\u6b64\u9009\u9879\u4e0d\u9002\u7528\u4e8eIPv6\u3002\u5982\u679c\u8bbe\u7f6e\uff0c\u5219Dnsmasq\u5c06\u4e0d\u4f1a\u7ed1\u5b9a\u5230IPv6\u5730\u5740\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>DNSSEC<\/td>\n<td>\u9a8c\u8bc1DNS\u7b54\u590d\u5e76\u7f13\u5b58DNSSEC\u6570\u636e\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>DHCP\u6ce8\u518c<\/td>\n<td>\u5728Dnsmasq\u4e2d\u6ce8\u518cdhcp\u79df\u7ea6\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u89e3\u6790\u5176\u4e3b\u673a\u540d\u3002\uff08\u4ec5IPv4\uff09<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>DHCP\u57df\u8986\u76d6<\/td>\n<td>\u8bbe\u7f6e\u540e\uff0c\u8bf7\u4f7f\u7528\u6b64\u5904\u6307\u5b9a\u7684\u57df\u540d\u800c\u4e0d\u662f\u7cfb\u7edf\u57df\u6765\u6ce8\u518c\u5730\u5740\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u9759\u6001DHCP<\/td>\n<td>\u8981\u6ce8\u518c\u7684\u9759\u6001dhcp\u5730\u5740\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u987a\u5e8f\u67e5\u8be2DNS\u670d\u52a1\u5668<\/td>\n<td>\u5982\u679c\u8bbe\u7f6e\u4e86\u6b64\u9009\u9879\uff0c\u5219Dnsmasq\u5c06\u6309\u6307\u5b9a\u7684\u987a\u5e8f\uff08\u7cfb\u7edf\uff1a\u5e38\u89c4\u8bbe\u7f6e\uff1aDNS\u670d\u52a1\u5668\uff09\u987a\u5e8f\u67e5\u8be2DNS\u670d\u52a1\u5668\uff0c\u800c\u4e0d\u662f\u540c\u65f6\u5e76\u884c\u67e5\u8be2\u6240\u6709DNS\u670d\u52a1\u5668\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u9700\u8981\u57df\u540d<\/td>\n<td>\u5982\u679c\u8bbe\u7f6e\u4e86\u6b64\u9009\u9879\uff0c\u5219Dnsmasq\u4e0d\u4f1a\u5c06\u4e0d\u5e26\u70b9\u6216\u57df\u90e8\u5206\u7684\u7eaf\u540d\u79f0\u7684A\u6216AAAA\u67e5\u8be2\u8f6c\u53d1\u5230\u4e0a\u6e38\u57df\u540d\u670d\u52a1\u5668\u3002\u5982\u679c\u4ece\/ etc \/ hosts\u6216DHCP\u65e0\u6cd5\u77e5\u9053\u8be5\u540d\u79f0\uff0c\u5219\u8fd4\u56de\u201c\u672a\u627e\u5230\u201d\u7b54\u6848\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u4e0d\u8f6c\u53d1\u79c1\u6709\u53cd\u5411\u67e5\u627e<\/td>\n<td>\u5982\u679c\u8bbe\u7f6e\u6b64\u9009\u9879\uff0c\u5219Dnsmasq\u4e0d\u4f1a\u5c06\u79c1\u6709\u5730\u5740\uff08RFC 1918\uff09\u7684\u53cd\u5411DNS\u67e5\u627e\uff08PTR\uff09\u8f6c\u53d1\u7ed9\u4e0a\u6e38\u57df\u540d\u670d\u52a1\u5668\u3002\u201c\u57df\u8986\u76d6\u201d\u90e8\u5206\u4e2d\u5c06\u79c1\u6709\u201c nnnin-addr.arpa\u201d\u540d\u79f0\u8f6c\u53d1\u5230\u7279\u5b9a\u670d\u52a1\u5668\u7684\u6240\u6709\u6761\u76ee\u4ecd\u5c06\u8f6c\u53d1\u3002\u5982\u679c\/ etc \/ hosts\uff0cDHCP\u6216\u7279\u5b9a\u7684\u57df\u8986\u76d6\u4e0d\u77e5\u9053\u8981\u4f7f\u7528\u540d\u79f0\u7684IP\uff0c\u5219\u7acb\u5373\u8fd4\u56de\u201c\u672a\u627e\u5230\u201d\u7b54\u6848\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u8bb0\u5f55\u67e5\u8be2<\/td>\n<td>\u8bb0\u5f55DNS\u67e5\u8be2\u7684\u7ed3\u679c\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"host-overrides\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u4e3b\u673a\u8986\u76d6<\/h1>\n<p>\u8fd9\u91cc\u53ef\u4ee5\u5b9a\u4e49\u9759\u6001\u4e3b\u673a\u540d\uff0c\u5f53\u88ab\u8be2\u95ee\u65f6\uff0c\u5b83\u5141\u8bb8\u7b54\u590d\u7279\u5b9a\u7684\u5730\u5740\uff0c\u6bcf\u4e2a\u6761\u76ee\u90fd\u6709\u4ee5\u4e0b\u9009\u9879\u53ef\u7528\u3002<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils align-default\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr class=\"row-odd\">\n<td>\u4e3b\u673a<\/td>\n<td>\u8981\u6ce8\u518c\u7684\u4e3b\u673a\u540d<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u57df<\/td>\n<td>\u8981\u4f7f\u7528\u7684\u57df\u540d<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>IP\u5730\u5740<\/td>\n<td>\u4e3b\u673a\u7684IP\u5730\u5740\uff0c\u53ef\u4ee5\u662fIPv4\uff08A\u8bb0\u5f55\uff09\u6216IPv6\u5730\u5740\uff08AAAA\u8bb0\u5f55\uff09<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u63cf\u8ff0<\/td>\n<td>\u8be5\u4e3b\u673a\u7684\u63cf\u8ff0\u6027\u6587\u5b57<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u522b\u540d<\/td>\n<td>\u4e3a\u76f8\u540c\u7684IP\u5730\u5740\u6ce8\u518c\u5907\u7528\u4e3b\u673a+\u57df\u540d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"domain-overrides\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u57df\u8986\u76d6<\/h1>\n<p>\u5982\u679c\u7279\u5b9a\u57df\u5e94\u7531\u5176\u4ed6DNS\u670d\u52a1\u5668\u5e94\u7b54\uff0c\u5219\u53ef\u4ee5\u5728\u6b64\u5904\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<div class=\"wy-table-responsive\">\n<table class=\"docutils align-default\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr class=\"row-odd\">\n<td>\u57df<\/td>\n<td>\u8981\u4f7f\u7528\u7684\u57df\u540d<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>IP\u5730\u5740<\/td>\n<td>\u8be5\u57df\u7684\u6743\u5a01DNS\u670d\u52a1\u5668\u7684IP\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u7aef\u53e3<\/td>\n<td>\u76ee\u6807DNS\u670d\u52a1\u5668\u7684\u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\u767d\uff0853\uff09<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u6e90IP<\/td>\n<td>\u67e5\u8be2\u8986\u76d6\u57df\u7684DNS\u670d\u52a1\u5668\u7684\u6e90IP\u5730\u5740\u3002\u9664\u975e\u901a\u8fc7VPN\u96a7\u9053\u8bbf\u95eeDNS\u670d\u52a1\u5668\uff0c\u5426\u5219\u8bf7\u7559\u7a7a\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u63cf\u8ff0<\/td>\n<td>\u6b64\u6761\u76ee\u7684\u63cf\u8ff0\u6027\u6587\u5b57<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"advanced-settings\" class=\"section\">\n<h1 style=\"text-align: justify;\">\u9ad8\u7ea7\u8bbe\u7f6e<\/h1>\n<p style=\"text-align: justify;\">\u8981\u914d\u7f6egui\u4e2d\u4e0d\u53ef\u7528\u7684\u9009\u9879\uff0c\u53ef\u4ee5\u5728\u9632\u706b\u5899\u672c\u8eab\u6dfb\u52a0\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u3002\u53ef\u4ee5\u6dfb\u52a0\u6587\u4ef6\u5230<code class=\"code docutils literal notranslate\"><span class=\"pre\">\/usr\/local\/etc\/dnsmasq.conf.d\/<\/span><\/code>\uff0c\u8fd9\u4e9b\u6587\u4ef6\u5e94\u4f7f\u7528\u6269\u5c55\u540d.conf\uff08\u4f8b\u5982custom-options.conf\uff09\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Dnsmasq\u662f\u4e00\u79cd\u8f7b\u578b\u3001\u5bb9\u6613\u914d\u7f6e\u7684DNS\u8f6c\u53d1\u5668\uff0c\u53ef\u7528\u4e8e\u7b54\u590d\u6765\u81ea\u7f51\u7edc\u7684dns\u67e5\u8be2 &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=6880\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[312],"class_list":["post-6880","post","type-post","status-publish","format-standard","hentry","category-opnsense","tag-dnsmasq"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/6880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6880"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/6880\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}