{"id":6874,"date":"2021-03-24T08:53:00","date_gmt":"2021-03-24T00:53:00","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=6874"},"modified":"2021-07-24T10:55:22","modified_gmt":"2021-07-24T02:55:22","slug":"opnsense%e7%94%a8%e6%88%b7%e6%89%8b%e5%86%8c-unbound-dns","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=6874","title":{"rendered":"OPNsense\u7528\u6237\u624b\u518c-Unbound DNS"},"content":{"rendered":"<div class=\"document\" role=\"main\">\n<div id=\"unbound-dns\" class=\"section\">\n<p style=\"text-align: justify;\">Unbound\u662f\u4e00\u4e2a\u9a8c\u8bc1\u3001\u9012\u5f52\u3001\u7f13\u5b58\u7684DNS\u89e3\u6790\u5668\u3002\u5b83\u5feb\u6377\u7cbe\u5de7\uff0c\u5e76\u878d\u5408\u4e86\u57fa\u4e8e\u5f00\u653e\u6807\u51c6\u7684\u73b0\u4ee3\u529f\u80fd\u3002<\/p>\n<p style=\"text-align: justify;\">\u4eceOPNsense 17.7\u5f00\u59cb\uff0c\u5b83\u5df2\u6210\u4e3aOPNsense\u6807\u51c6DNS\u670d\u52a1\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u5728\u65b0\u5b89\u88c5\u65f6\u542f\u7528\u8be5\u670d\u52a1\u3002<\/p>\n<div id=\"general-settings\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u5e38\u89c4\u8bbe\u7f6e<\/h1>\n<p>\u5bfc\u822a\u5230&#8221;\u670d\u52a1&gt;Unbound DNS&gt;\u5e38\u89c4\u201d\u83dc\u5355\u90e8\u5206\uff0c\u6709\u4ee5\u4e0b\u7684\u76f8\u5173\u8bbe\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>\u542f\u7528<\/td>\n<td>\u542f\u7528DNS\u89e3\u6790\u5668<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u4fa6\u542c\u7aef\u53e3<\/td>\n<td>\u8981\u76d1\u542c\u7684\u7aef\u53e3\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u4f7f\u7528\u9ed8\u8ba4\u503c\uff0853\uff09\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u7f51\u7edc\u63a5\u53e3<\/td>\n<td>\u7528\u4e8e\u54cd\u5e94\u5ba2\u6237\u7aef\u67e5\u8be2\u7684\u63a5\u53e3\u3002\u5982\u679c\u63a5\u53e3\u540c\u65f6\u5177\u6709IPv4\u548cIPv6 IP\uff0c\u5219\u5c06\u4e24\u8005\u90fd\u4f7f\u7528\u3002\u5bf9\u672a\u9009\u62e9\u7684\u5176\u4ed6\u63a5\u53e3\u7684\u67e5\u8be2\u5c06\u88ab\u4e22\u5f03\u3002\u9ed8\u8ba4\u884c\u4e3a\u662f\u54cd\u5e94\u6bcf\u4e2a\u53ef\u7528\u7684IPv4\u548cIPv6\u5730\u5740\u4e0a\u7684\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>DNSSEC<\/td>\n<td>\u4f7f<a class=\"reference external\" href=\"https:\/\/en.wikipedia.org\/wiki\/Domain_Name_System_Security_Extensions\">DNSSEC<\/a>\u00a0\u80fd\u591f\u4f7f\u7528\u6570\u5b57\u7b7e\u540d\u6765\u9a8c\u8bc1\u4e0a\u6e38\u670d\u52a1\u5668\u7684\u7ed3\u679c\u5e76\u51cf\u8f7b<a class=\"reference external\" href=\"https:\/\/en.wikipedia.org\/wiki\/DNS_spoofing\">\u7f13\u5b58\u4e2d\u6bd2\u7684\u98ce\u9669<\/a>\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>DNS64<\/td>\n<td>\u542f\u7528<a class=\"reference external\" href=\"https:\/\/en.wikipedia.org\/wiki\/IPv6_transition_mechanism#DNS64\">DNS64\uff0c<\/a> \u4ee5\u4fbf\u8ba9\u53ea\u6709IPv6\u5730\u5740\u7684\u5ba2\u6237\u7aef\u53ef\u4ee5\u8bbf\u95eeIPv4\u5730\u5740\u7684\u670d\u52a1\u5668\u3002\u5982\u679c\u542f\u7528\uff0c\u5219Unbound\u4f1a\u4e3a\u4ec5\u5177\u6709A\u8bb0\u5f55\u7684\u57df\u5408\u6210AAAA\u8bb0\u5f55\u3002DNS64\u9700\u8981NAT64\u624d\u6709\u7528\uff0c\u4f8b\u5982Tayga\u63d2\u4ef6\u6216\u7b2c\u4e09\u65b9NAT64\u670d\u52a1\u3002DNS64\u524d\u7f00\u5fc5\u987b\u4e0e\u7528\u4f5cNAT64\u7684IPv6\u524d\u7f00\u5339\u914d\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>DHCP\u6ce8\u518c<\/td>\n<td>\u53ea\u5bf9IPv4\u6709\u6548\u3002\u5982\u679c\u8bbe\u7f6e\u4e86\u6b64\u9009\u9879\uff0c\u5219\u5728\u8bf7\u6c42DHCP\u79df\u7ea6\u65f6\u6307\u5b9a\u5176\u4e3b\u673a\u540d\u7684\u8ba1\u7b97\u673a\u5c06\u5728\u201cUnbound\u201d\u4e2d\u6ce8\u518c\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u89e3\u6790\u5176\u540d\u79f0\u3002<\/p>\n<p>\u6570\u636e\u7684\u6765\u6e90\u662f<a class=\"reference external\" href=\"https:\/\/www.freebsd.org\/cgi\/man.cgi?query=dhcpd.leases\">dhcpd.leases<\/a>\u6587\u4ef6\u4e2d\u7684<strong>\u5ba2\u6237\u7aef\u4e3b\u673a\u540d<\/strong>\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>DHCP\u57df\u8986\u76d6<\/td>\n<td>\u5f53\u4e0a\u8ff0\u6ce8\u518c\u4e0d\u5e94\u8be5\u4f7f\u7528\u6b64\u9632\u706b\u5899\u4e0a\u914d\u7f6e\u7684\u76f8\u540c\u57df\u540d\u65f6\uff0c\u53ef\u4ee5\u5728\u6b64\u5904\u6307\u5b9a\u5176\u4ed6\u57df\u540d\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>DHCP\u9759\u6001\u6620\u5c04<\/td>\n<td>\u6ce8\u518c\u9759\u6001dhcpd\u6761\u76ee\uff0c\u4ee5\u4fbf\u5ba2\u6237\u7aef\u53ef\u4ee5\u5bf9\u5176\u89e3\u6790\u3002\u652f\u6301IPv4\u548cIPv6\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>IPv6\u94fe\u63a5\u672c\u5730<\/td>\n<td>\u6ce8\u518cIPv6\u7684\u94fe\u63a5\u672c\u5730\u5730\u5740\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>TXT\u8bb0\u5f55\u652f\u6301<\/td>\n<td>\u5982\u679c\u8bbe\u7f6e\u4e86\u6b64\u9009\u9879\uff0c\u5219\u4e0e\u4e3b\u673a\u6761\u76ee\u548cDHCP\u9759\u6001\u6620\u5c04\u76f8\u5173\u8054\u7684\u4efb\u4f55\u63cf\u8ff0\u5c06\u521b\u5efa\u76f8\u5e94\u7684\u6587\u672c\u8bb0\u5f55\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>DNS\u67e5\u8be2\u8f6c\u53d1<\/td>\n<td>\u5c06\u67e5\u8be2\u8f6c\u53d1\u5230<span class=\"menuselection\">\u7cfb\u7edf\u2023\u8bbe\u7f6e\u2023\u5e38\u89c4\u4e2d\u5df2<\/span>\u914d\u7f6e\u7684\u57df\u540d<span class=\"menuselection\">\u670d\u52a1\u5668\u3002<\/span><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u672c\u5730\u533a\u57df\u7c7b\u578b<\/td>\n<td>\u7528\u4e8e\u7cfb\u7edf\u57df\u7684\u672c\u5730\u533a\u57df\u7c7b\u578b\u3002\u7c7b\u578b\u8bf4\u660e\u5728<a class=\"reference external\" href=\"https:\/\/nlnetlabs.nl\/documentation\/unbound\/unbound.conf\/\">unbound.conf\uff085\uff09<\/a> \u624b\u518c\u9875\u7684\u201c local-zone\u201d\u4e2d\u63d0\u4f9b \u3002\u9ed8\u8ba4\u4e3a\u201ctransparent\u201d\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"admonition note\">\n<p class=\"admonition-title\">\u6ce8\u610f\uff1a\u5fc5\u987b\u5c0f\u5fc3\u5c06\u201cDNS\u67e5\u8be2\u8f6c\u53d1\u201d\u548c&#8221;DNSSEC&#8221;\u7ed3\u5408\u4f7f\u7528\uff0c\u5f53\u4e0a\u6e38\u670d\u52a1\u5668\u4e0d\u652f\u6301DNSSEC\u65f6\uff0c\u7531\u4e8e\u65e0\u6cd5\u6267\u884cDNSSEC\u9a8c\u8bc1\uff0c\u56e0\u6b64\u5176\u56de\u590d\u5c06\u88ab\u8ba4\u4e3a\u662f\u4e0d\u5b89\u5168\u7684\u3002<\/p>\n<\/div>\n<div class=\"admonition note\">\n<p class=\"admonition-title\">\u4e3a\u4e86\u4f7f\u5ba2\u6237\u7aef\u67e5\u8be2Unbound\uff0c\u9700\u8981\u5728<span class=\"menuselection\">\u670d\u52a1\u2023Unbound DNS\u2023\u8bbf\u95ee\u5217\u8868\u4e2d<\/span>\u5206\u914d\u4e00\u4e2aACL\u00a0\u3002\u914d\u7f6e\u7684\u63a5\u53e3\u5e94\u81ea\u52a8\u83b7\u5f97ACL\u3002\u5982\u679c\u5ba2\u6237\u7aef\u5730\u5740\u4e0d\u5728\u4efb\u4f55\u9884\u5b9a\u4e49\u7684\u7f51\u7edc\u4e2d\uff0c\u8bf7\u624b\u52a8\u6dfb\u52a0\u4e00\u4e2a\u3002<\/p>\n<\/div>\n<\/div>\n<div id=\"overrides\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u8986\u76d6<\/h1>\n<p>\u5728\u8986\u76d6\u90e8\u5206\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u5355\u72ec\u7684\u4e3b\u673a\u81ea\u5b9a\u4e49\u6761\u76ee\uff0c\u5e76\u6307\u5b9a\u662f\u5426\u5c06\u5bf9\u7279\u5b9a\u57df\u7684\u67e5\u8be2\u8f6c\u53d1\u5230\u9884\u5b9a\u4e49\u7684\u670d\u52a1\u5668\u3002<\/p>\n<div id=\"host-override-settings\" class=\"section\">\n<h3><strong>\u4e3b\u673a\u8986\u76d6\u8bbe\u7f6e<\/strong><\/h3>\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>\u4e3b\u673a\u540d\u79f0\uff0c\u4e0d\u5305\u542b\u57df\u90e8\u5206\u3002\u4f7f\u7528\u201c*\u201d\u521b\u5efa\u901a\u914d\u7b26\u6761\u76ee\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u57df<\/td>\n<td>\u4e3b\u673a\u7684\u57df\uff08\u4f8b\u5982example.com\uff09<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u7c7b\u578b<\/td>\n<td>\u8bb0\u5f55\u7c7b\u578b\uff0cA\u6216AAA\uff08IPv4\u6216IPv6\u5730\u5740\uff09\uff0cMX\u5b9a\u4e49\u90ae\u4ef6\u4ea4\u6362<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>IP<\/td>\n<td>\u4e3b\u673a\u5730\u5740<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u63cf\u8ff0<\/td>\n<td>\u7528\u6237\u53ef\u8bfb\u7684\u63cf\u8ff0\uff0c\u4ec5\u4f9b\u53c2\u8003<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u522b\u540d<\/td>\n<td>\u4ee5\u4e0a\u6570\u636e\u5728\u4e0d\u540c\u4e3b\u673a\u4e0a\u7684\u526f\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"domain-override-settings\" class=\"section\">\n<h3><strong>\u57df\u8986\u76d6\u8bbe\u7f6e<\/strong><\/h3>\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\u8986\u76d6\u7684\u57df<\/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>\u63cf\u8ff0<\/td>\n<td>\u7528\u6237\u53ef\u8bfb\u7684\u63cf\u8ff0\uff0c\u4ec5\u4f9b\u53c2\u8003<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"advanced\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u9ad8\u7ea7<\/h1>\n<p>\u5bf9\u4e8e\u4e00\u822c\u7528\u6237\uff0c\u9ed8\u8ba4\u8bbe\u7f6e\u5bf9\u4e8e\u5927\u591a\u6570\u8bbe\u7f6e\u800c\u8a00\u662f\u5408\u7406\u7684\uff0c\u4f46\u662f\u6709\u4e9b\u8bbe\u7f6e\u9700\u8981\u66f4\u591a\u8c03\u6574\u6216\u9700\u8981\u8bbe\u7f6e\u7279\u5b9a\u7684\u9009\u9879\u3002<\/p>\n<hr class=\"docutils\" \/>\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>\u9690\u85cf\u8eab\u4efd<\/td>\n<td>\u5982\u679c\u542f\u7528\uff0c\u5219\u62d2\u7eddid.server\u548chostname.bind\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u9690\u85cf\u7248\u672c<\/td>\n<td>\u5982\u679c\u542f\u7528\uff0c\u5219\u62d2\u7eddversion.server\u548cversion.bind\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u9884\u53d6\u652f\u6301<\/td>\n<td>\u6d88\u606f\u7f13\u5b58\u5143\u7d20\u5728\u8fc7\u671f\u4e4b\u524d\u9884\u53d6\uff0c\u4ee5\u5e2e\u52a9\u4f7f\u7f13\u5b58\u4fdd\u6301\u6700\u65b0\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u5219\u4f1a\u5bfc\u81f4\u670d\u52a1\u5668\u4e0a\u7684DNS\u6d41\u91cf\u548c\u8d1f\u8f7d\u589e\u52a0\u7ea610%\uff0c\u4f46\u9891\u7e41\u8bf7\u6c42\u7684\u9879\u4e0d\u4f1a\u4ece\u7f13\u5b58\u4e2d\u8fc7\u671f<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u9884\u53d6DNS\u5bc6\u94a5\u652f\u6301<\/td>\n<td>\u5f53\u9047\u5230<a href=\"http:\/\/en.wikipedia.org\/wiki\/List_of_DNS_record_types\">\u59d4\u6258\u7b7e\u7f72\u4eba<\/a>\u65f6\uff0c\u5728\u9a8c\u8bc1\u8fc7\u7a0b\u4e2d\u8f83\u65e9\u83b7\u53d6DNSKEY\u3002 \u8fd9\u6709\u52a9\u4e8e\u964d\u4f4e\u8bf7\u6c42\u7684\u5ef6\u8fdf\uff0c\u4f46\u53ef\u80fd\u5360\u7528\u66f4\u591a\u7684CPU\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u5f3a\u5316DNSSEC\u6570\u636e<\/td>\n<td>\u4fe1\u4efb\u951a\u5b9a\u533a\u57df\u9700\u8981DNSSEC\u6570\u636e\u3002\u5982\u679c\u6ca1\u6709\u8fd9\u6837\u7684\u6570\u636e\uff0c\u8fd9\u4e2a\u4e13\u533a\u5c31\u4f1a\u53d8\u6210\u4f2a\u9020\u7684\u3002\u5982\u679c\u7981\u7528\u4e86\u6b64\u529f\u80fd\uff0c\u5e76\u4e14\u6ca1\u6709\u63a5\u6536\u5230DNSSEC\u6570\u636e\uff0c\u5219\u8be5\u533a\u57df\u662f\u4e0d\u5b89\u5168\u7684\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u670d\u52a1\u8fc7\u671f\u54cd\u5e94<\/td>\n<td>\u4eceTTL\u4e3a0\u7684\u7f13\u5b58\u4e2d\u83b7\u53d6\u8fc7\u671f\u7684\u54cd\u5e94\uff0c\u800c\u65e0\u9700\u7b49\u5f85\u5b9e\u9645\u7684\u89e3\u6790\u5b8c\u6210\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u6d88\u606f\u7f13\u5b58\u5927\u5c0f<\/td>\n<td>\u6d88\u606f\u7f13\u5b58\u7684\u5927\u5c0f\u3002 \u6d88\u606f\u7f13\u5b58\u5b58\u50a8DNS rcodes\u548c\u9a8c\u8bc1\u72b6\u6001\u3002 RRSet\u7f13\u5b58\u5c06\u81ea\u52a8\u8bbe\u7f6e\u4e3a\u6b64\u6570\u91cf\u7684\u4e24\u500d\u3002 RRSet\u7f13\u5b58\u5305\u542b\u5b9e\u9645\u7684RR\u6570\u636e\u3002 \u9ed8\u8ba4\u503c\u4e3a4 MB\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u51fa\u7ad9TCP\u7f13\u51b2\u533a<\/td>\n<td>\u8981\u4e3a\u6bcf\u4e2a\u7ebf\u7a0b\u5206\u914d\u7684\u51fa\u7ad9TCP\u7f13\u51b2\u533a\u6570\u3002 \u9ed8\u8ba4\u503c\u4e3a10\u3002\u5982\u679c\u9009\u62e90\uff0c\u5219\u4e0d\u4f1a\u5bf9\u8ba4\u8bc1\u670d\u52a1\u5668\u8fdb\u884cTCP\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u5165\u7ad9\u7684TCP\u7f13\u51b2\u533a<\/td>\n<td>\u6bcf\u4e2a\u7ebf\u7a0b\u5206\u914d\u7684\u5165\u7ad9TCP\u7f13\u51b2\u533a\u6570\u3002 \u9ed8\u8ba4\u503c\u4e3a10\u3002\u5982\u679c\u9009\u62e90\uff0c\u5219\u4e0d\u63a5\u53d7\u6765\u81ea\u5ba2\u6237\u7aef\u7684TCP\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u6bcf\u4e2a\u7ebf\u7a0b\u7684\u67e5\u8be2\u6570<\/td>\n<td>\u6bcf\u4e2a\u7ebf\u7a0b\u5c06\u540c\u65f6\u670d\u52a1\u7684\u67e5\u8be2\u6570\u3002\u5982\u679c\u6709\u66f4\u591a\u7684\u67e5\u8be2\u9700\u8981\u670d\u52a1\uff0c\u5e76\u4e14\u6ca1\u6709\u67e5\u8be2\u53ef\u4ee5\u7ade\u4e89\uff0c\u90a3\u4e48\u8fd9\u4e9b\u67e5\u8be2\u5c06\u88ab\u5220\u9664<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u62e5\u5835\u8d85\u65f6<\/td>\n<td>\u5728\u670d\u52a1\u5668\u975e\u5e38\u7e41\u5fd9\u65f6\uff0c\u8fd9\u53ef\u4ee5\u9632\u6b62\u8fc7\u6162\u6216\u8fc7\u591a\u67e5\u8be2\u5bfc\u81f4\u7684\u62d2\u7edd\u670d\u52a1\u3002 \u9ed8\u8ba4\u503c\u4e3a200\u6beb\u79d2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>RRset\u548c\u6d88\u606f\u7684\u6700\u5c0fTTL<\/td>\n<td>\u5728\u7f13\u5b58\u4e2d\u4e3aRRset\u548c\u6d88\u606f\u914d\u7f6e\u6700\u5927\u751f\u5b58\u65f6\u95f4\u3002\u9ed8\u8ba4\u503c\u4e3a86400\u79d2\uff081\u5929\uff09\u3002\u5f53\u5185\u90e8TTL\u8fc7\u671f\u65f6\uff0c\u7f13\u5b58\u9879\u4e5f\u4f1a\u8fc7\u671f\u3002\u53ef\u4ee5\u5c06\u5176\u914d\u7f6e\u4e3a\u5f3a\u5236\u89e3\u6790\u5668\u66f4\u9891\u7e41\u5730\u67e5\u8be2\u6570\u636e\uff0c\u5e76\u4e14\u4e0d\u4fe1\u4efb\uff08\u5f88\u5927\uff09TTL\u503c\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>RRset\u548c\u6d88\u606f\u7684\u6700\u5c0fTTL<\/td>\n<td>\u4e3a\u7f13\u5b58\u4e2d\u7684rrset\u548c\u6d88\u606f\u914d\u7f6e\u6700\u77ed\u751f\u5b58\u65f6\u95f4\u3002\u9ed8\u8ba4\u4e3a0\u79d2\u3002\u5982\u679c\u51fa\u73b0\u6700\u5c0f\u503c\uff0c\u5219\u7f13\u5b58\u6570\u636e\u7684\u65f6\u95f4\u5c06\u8d85\u8fc7\u57df\u6240\u6709\u8005\u7684\u9884\u671f\uff0c\u4ece\u800c\u51cf\u5c11\u67e5\u8be2\u6570\u636e\u7684\u6b21\u6570\u30020\u503c\u786e\u4fdd\u7f13\u5b58\u4e2d\u7684\u6570\u636e\u7b26\u5408\u57df\u6240\u6709\u8005\u7684\u610f\u56fe\u3002\u9ad8\u503c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u95ee\u9898\uff0c\u56e0\u4e3a\u7f13\u5b58\u4e2d\u7684\u6570\u636e\u53ef\u80fd\u4e0d\u518d\u4e0e\u5b9e\u9645\u6570\u636e\u5339\u914d\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u4e3b\u673a\u7f13\u5b58\u6761\u76ee\u7684TTL<\/td>\n<td>\u4e3b\u673a\u7f13\u5b58\u4e2d\u7684\u6761\u76ee\u751f\u5b58\u65f6\u95f4\u3002\u4e3b\u673a\u7f13\u5b58\u5305\u542b\u5f80\u8fd4\u8ba1\u65f6\u548cEDNS\u652f\u6301\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u4e3a15\u5206\u949f\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u8981\u7f13\u5b58\u7684\u4e3b\u673a\u6570<\/td>\n<td>\u4e3a\u5176\u7f13\u5b58\u4fe1\u606f\u7684\u4e3b\u673a\u6570\u3002\u9ed8\u8ba4\u503c\u4e3a10000\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u65e0\u9700\u5e94\u7b54\u9608\u503c<\/td>\n<td>\u5982\u679c\u542f\u7528\uff0c\u5728\u6bcf\u4e2a\u7ebf\u7a0b\u4e2d\u8ddf\u8e2a\u4e0d\u9700\u8981\u5e94\u7b54\u7684\u603b\u6570\u3002\u5f53\u5230\u8fbe\u9608\u503c\u65f6\uff0c\u5c06\u91c7\u53d6\u9632\u5fa1\u64cd\u4f5c\uff0c\u5e76\u5c06\u8b66\u544a\u6253\u5370\u5230\u65e5\u5fd7\u6587\u4ef6\u4e2d\u3002\u8fd9\u4e2a\u9632\u5fa1\u52a8\u4f5c\u662f\u4e3a\u4e86\u6e05\u9664RRSet\u548c\u6d88\u606f\u7f13\u5b58\uff0c\u5e0c\u671b\u80fd\u591f\u6e05\u9664\u4efb\u4f55\u6709\u5bb3\u4fe1\u606f\u3002\u9ed8\u8ba4\u503c\u662f\u7981\u7528\u7684\uff0c\u4f46\u5982\u679c\u542f\u7528\uff0c\u5efa\u8bae\u503c\u4e3a1,000\u4e07\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u65e5\u5fd7\u5c42\u7ea7<\/td>\n<td>\u9009\u62e9\u65e5\u5fd7\u8be6\u7ec6\u7a0b\u5ea6\u3002 0\u7ea7\u610f\u5473\u7740\u6700\u7cbe\u7b80\uff0c\u53ea\u8bb0\u5f55\u9519\u8bef\u3002 1\u7ea7\u8bb0\u5f55\u64cd\u4f5c\u4fe1\u606f\u3002 2\u7ea7\u8bb0\u5f55\u8be6\u7ec6\u7684\u64cd\u4f5c\u4fe1\u606f\u30023\u7ea7\u63d0\u4f9b\u67e5\u8be2\u7ea7\u522b\u4fe1\u606f\uff0c\u8bb0\u5f55\u6bcf\u4e2a\u67e5\u8be2\u7684\u8f93\u51fa\u30024\u7ea7\u7ed9\u51fa\u7b97\u6cd5\u7ea7\u522b\u4fe1\u606f\u30025\u7ea7\u8bb0\u5f55\u7f13\u5b58\u672a\u547d\u4e2d\u5ba2\u6237\u7aef\u6807\u8bc6\u3002\u9ed8\u8ba4\u4e3a1\u7ea7\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div id=\"access-lists\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u8bbf\u95ee\u5217\u8868<\/h1>\n<p>\u8bbf\u95ee\u5217\u8868\u5b9a\u4e49\u54ea\u4e9b\u5ba2\u6237\u7aef\u53ef\u4ee5\u67e5\u8be2dns\u89e3\u6790\u5668\u3002\u5206\u914d\u63a5\u53e3\u7684\u8bb0\u5f55\u5c06\u81ea\u52a8\u521b\u5efa\uff0c\u5e76\u663e\u793a\u5728\u6982\u8ff0\u4e2d\u3002\u8fd8\u53ef\u4ee5\u5b9a\u4e49\u81ea\u5b9a\u4e49\u7b56\u7565\uff0c\u5c06\u7b56\u7565\u5e94\u7528\u4e8e\u9884\u5b9a\u4e49\u7684\u7f51\u7edc\u3002<\/p>\n<div class=\"admonition note\">\n<p class=\"admonition-title\">\u6ce8\u610f\uff1a\u8be5\u52a8\u4f5c\u53ef\u4ee5\u5728\u4e0b\u9762\u7684\u5217\u8868\u4e2d\u5b9a\u4e49\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u62d2\u7edd\u5339\u914d\uff0c\u5219\u4f7f\u7528\u6700\u7279\u5b9a\u7684\u7f51\u7edc\u8303\u56f4\u8fdb\u884c\u5339\u914d\u3002\u56e0\u6b64\uff0c\u8bbf\u95ee\u63a7\u5236\u8bed\u53e5\u7684\u987a\u5e8f\u65e0\u5173\u7d27\u8981\u3002<\/p>\n<\/div>\n<div id=\"actions\" class=\"section\">\n<p><strong>\u64cd\u4f5c<\/strong><\/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>Deny<\/td>\n<td>\u8be5\u64cd\u4f5c\u5c06\u505c\u6b62\u6765\u81ea\u5df2\u5b9a\u4e49\u7f51\u7edc\u5185\u4e3b\u673a\u7684\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>Refuse<\/td>\n<td>\u6b64\u64cd\u4f5c\u505c\u6b62\u6765\u81ea\u5df2\u5b9a\u4e49\u7f51\u7edc\u5185\u4e3b\u673a\u7684\u67e5\u8be2\uff0c\u4e14\u4f1a\u5c06DNS rcode REFUSED\u9519\u8bef\u6d88\u606f\u53d1\u9001\u56de\u5ba2\u6237\u7aef\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>Allow<\/td>\n<td>\u6b64\u64cd\u4f5c\u5141\u8bb8\u6765\u81ea\u5df2\u5b9a\u4e49\u7f51\u7edc\u5185\u4e3b\u673a\u7684\u67e5\u8be2\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>Allow Snoop<\/td>\n<td>\u6b64\u64cd\u4f5c\u5141\u8bb8\u4ece\u5b9a\u4e49\u7684\u7f51\u7edc\u5185\u7684\u4e3b\u673a\u8fdb\u884c\u9012\u5f52\u548c\u975e\u9012\u5f52\u8bbf\u95ee\u3002\u7528\u4e8e\u9ad8\u901f\u7f13\u5b58\u4fa6\u542c\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u5e94\u8be5\u53ea\u4e3a\u4f60\u7684\u7ba1\u7406\u4e3b\u673a\u914d\u7f6e\u3002<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>Deny Non-local<\/td>\n<td>\u4ec5\u5141\u8bb8\u4ece\u5b9a\u4e49\u7684\u7f51\u7edc\u5185\u7684\u4e3b\u673a\u8fdb\u884c\u6743\u5a01\u7684\u672c\u5730\u6570\u636e\u67e5\u8be2\u3002\u4e0d\u5141\u8bb8\u7684\u6d88\u606f\u5c06\u88ab\u4e22\u5f03\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>Refuse Non-local<\/td>\n<td>\u4ec5\u5141\u8bb8\u4ece\u5b9a\u4e49\u7684\u7f51\u7edc\u5185\u7684\u4e3b\u673a\u8fdb\u884c\u6743\u5a01\u7684\u672c\u5730\u6570\u636e\u67e5\u8be2\u3002\u5e76\u5c06DNS rcode REFUSED\u9519\u8bef\u6d88\u606f\u53d1\u9001\u56de\u5ba2\u6237\u7aef\uff0c\u4ee5\u83b7\u53d6\u4e0d\u88ab\u5141\u8bb8\u7684\u6d88\u606f\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"blacklist\" class=\"section\" style=\"text-align: justify;\">\n<h1>\u9ed1\u540d\u5355<\/h1>\n<p>\u4f7f\u7528\u9884\u5b9a\u4e49\u6765\u6e90\u6216\u81ea\u5b9a\u4e49\u5217\u8868\u6765\u542f\u7528\u96c6\u6210\u7684dns\u9ed1\u540d\u5355\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\u7528\u9ed1\u540d\u5355<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>DNSBL\u7c7b\u578b<\/td>\n<td>\u9884\u5b9a\u4e49\u7684\u5916\u90e8\u6765\u6e90<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u9ed1\u540d\u5355\u7f51\u5740<\/td>\n<td>\u8981\u4ece\u4e2d\u4e0b\u8f7d\u9ed1\u540d\u5355\u7684\u5176\u4ed6http [s]\u4f4d\u7f6e\uff0c\u4ec5\u652f\u6301\u5305\u542bfqdn\u5217\u8868\uff08\u4f8b\u5982<code class=\"code docutils literal notranslate\"><span class=\"pre\">my.evil.domain.com<\/span><\/code>\uff09\u7684\u7eaf\u6587\u672c\u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u767d\u540d\u5355\u57df\u540d<\/td>\n<td>\u5f53\u9ed1\u540d\u5355\u9879\u76ee\u5305\u542b\u5728\u6b64\u5217\u8868\u4e2d\u5b9a\u4e49\u7684\u6a21\u5f0f\u65f6\uff0c\u5176\u7ed3\u679c\u5c06\u88ab\u5ffd\u7565\u3002\u4f8b\u5982<code class=\"code docutils literal notranslate\"><span class=\"pre\">.*\\.nl<\/span><\/code>\u5c06\u6392\u9664\u6240\u6709.nl\u57df<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5f53\u4f7f\u7528\u4efb\u4f55DNSBL\u7c7b\u578b\u65f6\uff0c\u5c06\u76f4\u63a5\u4ece\u5176\u539f\u59cb\u6765\u6e90\u83b7\u53d6\u5185\u5bb9\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u4e86\u89e3\u5217\u8868\u7684\u6765\u6e90\uff0c\u4e0b\u9762\u7f16\u8bd1\u4e86\u5305\u542b\u5bf9\u5217\u8868\u7ef4\u62a4\u8005\u7684\u5f15\u7528\u7684\u5217\u8868\u3002<\/p>\n<div id=\"predefined-sources\" class=\"section\">\n<p><strong>\u9884\u5b9a\u4e49\u6765\u6e90<\/strong><\/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>AdAway<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/adaway.org\/\">https:\/\/adaway.org<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>AdGuard\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/justdomains.github.io\/blocklists\/#the-lists\">https:\/\/justdomains.github.io\/blocklists\/#the-lists<\/a><\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u963b\u6b62\u5217\u8868\u7f51\u7ad9<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/github.com\/blocklistproject\/Lists\">https:\/\/github.com\/blocklistproject\/\u5217\u8868<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u7b80\u6613\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/justdomains.github.io\/blocklists\/#the-lists\">https:\/\/justdomains.github.io\/blocklists\/#the-lists<\/a><\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u8f7b\u677e\u9690\u79c1<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/justdomains.github.io\/blocklists\/#the-lists\">https:\/\/justdomains.github.io\/blocklists\/#the-lists<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>NoCoin\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/justdomains.github.io\/blocklists\/#the-lists\">https:\/\/justdomains.github.io\/blocklists\/#the-lists<\/a><\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>PornTop1M\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/github.com\/chadmayfield\/my-pihole-blocklists\">https:\/\/github.com\/chadmayfield\/my-pihole-blocklists<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u7b80\u5355\u5e7f\u544a\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/s3.amazonaws.com\/lists.disconnect.me\/simple_ad.txt\">https:\/\/s3.amazonaws.com\/lists.disconnect.me\/simple_ad.txt<\/a><\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>\u7b80\u5355\u8ddf\u8e2a\u5668\u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/s3.amazonaws.com\/lists.disconnect.me\/simple_tracking.txt\">https:\/\/s3.amazonaws.com\/lists.disconnect.me\/simple_tracking.txt<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>\u53f2\u8482\u6587\u00b7\u5e03\u83b1\u514b\/\u4e3b\u673a<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/raw.githubusercontent.com\/StevenBlack\/hosts\/master\/hosts\">https:\/\/raw.githubusercontent.com\/StevenBlack\/hosts\/master\/hosts<\/a><\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td>WindowsSpyBlocker<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/github.com\/crazy-max\/WindowsSpyBlocker\">https:\/\/github.com\/crazy-max\/WindowsSpyBlocker<\/a><\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td>YoYo \u5217\u8868<\/td>\n<td><a class=\"reference external\" href=\"https:\/\/pgl.yoyo.org\/adservers\/\">https:\/\/pgl.yoyo.org\/adservers\/<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"admonition note\">\n<p class=\"admonition-title\">\u6ce8\u610f\uff1a\u4e3a\u4e86\u6309\u65f6\u95f4\u95f4\u9694\u81ea\u52a8\u66f4\u65b0\u5217\u8868\uff0c\u8fd8\u9700\u8981\u6dfb\u52a0cron\u4efb\u52a1\uff0c\u8f6c\u5230\u201c<span class=\"menuselection\">\u7cfb\u7edf\u201d-&gt;\u201c\u8bbe\u7f6e\u201d-&gt;\u201c \u8ba1\u5212\u201d<\/span>\uff0c\u6dfb\u52a0\u4e00\u4e2a\u201cDownload Unbound DNSBLs and restart\u201d\u65b0\u4efb\u52a1\u5373\u53ef\u3002<\/p>\n<h1><span style=\"color: #000000; font-weight: bold;\">\u7edf\u8ba1<\/span><\/h1>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"statistics\" class=\"section\">\n<p style=\"text-align: justify;\">\u7edf\u8ba1\u4fe1\u606f\u9875\u9762\u63d0\u4f9b\u4e86\u6709\u5173\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\u5668\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u4f8b\u5982\u6267\u884c\u7684\u67e5\u8be2\u6570\uff0c\u7f13\u5b58\u4f7f\u7528\u7387\u548c\u6b63\u5e38\u8fd0\u884c\u65f6\u95f4\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Unbound\u662f\u4e00\u4e2a\u9a8c\u8bc1\u3001\u9012\u5f52\u3001\u7f13\u5b58\u7684DNS\u89e3\u6790\u5668\u3002\u5b83\u5feb\u6377\u7cbe\u5de7\uff0c\u5e76\u878d\u5408\u4e86\u57fa\u4e8e\u5f00\u653e &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=6874\">\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":[311],"class_list":["post-6874","post","type-post","status-publish","format-standard","hentry","category-opnsense","tag-unbound"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/6874","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=6874"}],"version-history":[{"count":0,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/6874\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}