{"id":51,"date":"2025-01-13T17:35:00","date_gmt":"2025-01-13T09:35:00","guid":{"rendered":"https:\/\/blog.unicom.cloudns.be\/?p=51"},"modified":"2025-01-13T20:21:16","modified_gmt":"2025-01-13T12:21:16","slug":"%e4%bd%bf%e7%94%a8adguardhome%e6%90%ad%e5%bb%ba%e7%a7%81%e6%9c%89dns%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/blog.unicom.cloudns.be\/?p=51","title":{"rendered":"\u4f7f\u7528AdGuardHome\u642d\u5efa\u79c1\u6709DNS\u670d\u52a1\u5668"},"content":{"rendered":"<h4>\u4e00\u3001\u51c6\u5907<\/h4>\n<ul>\n<li>\u4e00\u53f0\u670d\u52a1\u5668  <\/li>\n<li>\u4e00\u4e2a\u57df\u540d   <\/li>\n<\/ul>\n<h4>\u4e8c\u3001\u5b89\u88c5AdGuardHome<\/h4>\n<p>\u5230AdGuardHome\u7684Github\u4e0b\u8f7d\u76f8\u5e94\u5e73\u53f0\u7684Release\uff0c\u89e3\u538b\u540e\u5c06\u4e8c\u8fdb\u5236\u6587\u4ef6\u653e\u5230\u6307\u5b9a\u76ee\u5f55\u4e2d\uff08\u672c\u6587\u4ee5<code>\/opt\/adguardhome<\/code>\u4e3a\u4f8b\u3002 <\/p>\n<ul>\n<li>\u5b89\u88c5AdGuradHome\u670d\u52a1:<br \/>\n<code>$ sudo \/opt\/adguardhome\/AdGuardHome -s install<\/code><\/li>\n<\/ul>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u4f7f\u7528\u6d4f\u89c8\u5668<code>http:\/\/[\u670d\u52a1\u5668IP]]:3000<\/code>\u5373\u53ef\u6253\u5f00\u7ba1\u7406\u7f51\u9875\u5f00\u59cb\u6839\u636e\u5411\u5bfc\u5f00\u59cb\u8bbe\u5b9a\u3002<\/p>\n<h4>\u4e09\u3001\u4f7f\u7528Let's Encrypt\u4e3a\u57df\u540d\u7b7e\u53d1\u8bc1\u4e66<\/h4>\n<ul>\n<li>\n<p>\u5b89\u88c5Certbot<br \/>\n<code>$ sudo apt install certbot<\/code><\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528Certbot\u4e3a\u57df\u540d\u7b7e\u53d1\u8bc1\u4e66\uff08\u7535\u5b50\u90ae\u4ef6\u548c\u57df\u540d\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u8c03\u6574\uff09<br \/>\n<code>$ sudo certbot certonly --standalone -n --agree-tos --email webmaster@example.com --preferred-challenges http -d dns.example.com<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u8bc1\u4e66\u7b7e\u53d1\u5b8c\u6210\u540e\uff0cCertbot\u4f1a\u8f93\u51fa\u8bc1\u4e66\u5b58\u50a8\u8def\u5f84\u548c\u8bc1\u4e66\u6709\u6548\u671f\u3002\u53e6\u5916\uff0c\u4f7f\u7528\u4ee5\u4e0a\u547d\u4ee4\u7b7e\u540d\u65f6\u5019\uff0c\u4f1a\u4f7f\u7528\u5230<code>80<\/code>\u7aef\u53e3\u505a\u9a8c\u8bc1\uff0c\u6240\u4ee5\u9700\u8981\u4fdd\u8bc1\u670d\u52a1\u5668\u7684<code>80<\/code>\u7aef\u53e3\u5904\u4e8e\u53ef\u7528\u72b6\u6001\uff0c\u6709\u4e86\u4ee5\u4e0a\u4e24\u4e2a\u8bc1\u4e66\u5b58\u653e\u7684\u8def\u5f84\u4ee5\u540e\uff0c\u56de\u5230AdGuardHome\u7ba1\u7406\u754c\u9762\uff0c\u5728<code>\u8bbe\u7f6e<\/code> - <code>\u52a0\u5bc6\u8bbe\u7f6e<\/code>\u4e2d\uff0c\u52fe\u9009<code>\u542f\u7528\u52a0\u5bc6<\/code>\uff0c\u5728\u4e0b\u65b9\u586b\u5165\u8bc1\u4e66\u8def\u5f84\u5e76\u4fdd\u5b58\u3002\u8bbe\u7f6e\u5b8c\u6210\u540e\u4fbf\u53ef\u901a\u8fc7<code>https:\/\/[\u670d\u52a1\u5668\u57df\u540d]\/dns-query<\/code>\u4f7f\u7528DoH\u670d\u52a1\u3002<\/p>\n<h4>\u56db\u3001\u8bbe\u7f6e\u81ea\u52a8\u4e3a\u57df\u540d\u8bc1\u4e66\u7eed\u671f<\/h4>\n<ul>\n<li>\u5148\u6d4b\u8bd5\u8bc1\u4e66\u80fd\u5426\u81ea\u52a8\u66f4\u65b0\uff0c\u4ee5\u4e0b\u547d\u4ee4\u7528\u4e8e\u6d4b\u8bd5\uff0c\u5e76\u4e0d\u4f1a\u5b9e\u9645\u6267\u884c\u66f4\u65b0\u64cd\u4f5c<br \/>\n<code>$ sudo certbot renew --dry-run<\/code><\/li>\n<li>\u5982\u6d4b\u8bd5\u65e0\u95ee\u9898\uff0c\u63a5\u4e0b\u6765\u5728\u8ba1\u5212\u4efb\u52a1\u91cd\u52a0\u5165\u6bcf\u4e24\u4e2a\u6708\u81ea\u52a8\u66f4\u65b0\u8bc1\u4e66<br \/>\n<code>$ crontab -e<\/code><\/li>\n<li>\u5728\u6587\u4ef6\u672b\u5c3e\u8ffd\u52a0\u4ee5\u4e0b\u5185\u5bb9\u5e76\u4fdd\u5b58\u9000\u51fa<br \/>\n<code>0 0 15 *\/2 * \/usr\/bin\/certbot renew --quiet<\/code><br \/>\n\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u6bcf\u9694\u4e24\u4e2a\u6708\u768415\u65e5\u4fbf\u4f1a\u81ea\u52a8\u7eed\u7b7e\u8bc1\u4e66\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u51c6\u5907 \u4e00\u53f0\u670d\u52a1\u5668 \u4e00\u4e2a\u57df\u540d \u4e8c\u3001\u5b89\u88c5AdGuardHome \u5230AdGuardHome\u7684Github\u4e0b\u8f7d\u76f8\u5e94 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":9,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":66,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/66"}],"wp:attachment":[{"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.unicom.cloudns.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}