{"id":507,"date":"2022-07-11T00:59:13","date_gmt":"2022-07-10T16:59:13","guid":{"rendered":"https:\/\/blog.73007300.xyz\/?p=507"},"modified":"2022-07-11T00:59:13","modified_gmt":"2022-07-10T16:59:13","slug":"debian-11-%e9%85%8d%e7%bd%ae-dns-over-httpsdoh","status":"publish","type":"post","link":"https:\/\/blog.73007300.xyz\/?p=507","title":{"rendered":"Debian 11 \u914d\u7f6e DNS over HTTPS(DoH)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">close other dns server if necessary<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl stop systemd-resolved\nsystemctl disable systemd-resolved<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">redirect local dns<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"nameserver 127.0.0.1\" > \/etc\/resolv.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">use dnss to perform DoH<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install dnss<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">dnss --help<br>\/etc\/default\/dnss<br>default is using google dns<br>https:\/\/dns.google\/dns-query<br>https:\/\/doh.dns.sb\/dns-query<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">change to cloudflare DNS<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's#--enable_dns_to_https#--enable_dns_to_https --https_upstream=https:\/\/1.1.1.1\/dns-query #g' \/etc\/default\/dnss\nsystemctl restart dnss<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">test <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install dnsutils -y\ndig jd.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>close other dns server if necessary redirect local dns use dnss to perform DoH dnss &#8211;help\/etc\/default\/dnssdefault is using google dnshttps:\/\/dns.google\/dns-queryhttps:\/\/doh.dns.sb\/dns-query change to cloudflare DNS test<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,2],"tags":[],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-config","category-tech"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=507"}],"version-history":[{"count":1,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/507\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/507\/revisions\/508"}],"wp:attachment":[{"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.73007300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}