(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{398:function(e,s,t){"use strict";t.r(s);var a=t(27),r=Object(a.a)({},(function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h2",{attrs:{id:"debian-and-most-popular-linux-distributions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#debian-and-most-popular-linux-distributions"}},[e._v("#")]),e._v(" Debian and most popular Linux distributions")]),e._v(" "),t("p",[e._v("For modern Linux distributions, we recommend using "),t("code",[e._v("systemd-resolved")])]),e._v(" "),t("h3",{attrs:{id:"_1-enable-systemd-resolved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-enable-systemd-resolved"}},[e._v("#")]),e._v(" 1. Enable systemd-resolved")]),e._v(" "),t("p",[t("code",[e._v("systemctl start systemd-resolved")])]),e._v(" "),t("h3",{attrs:{id:"_2-open-etc-systemd-resolved-conf"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-open-etc-systemd-resolved-conf"}},[e._v("#")]),e._v(" 2. Open /etc/systemd/resolved.conf")]),e._v(" "),t("p",[t("code",[e._v("vim /etc/systemd/resolved.conf")])]),e._v(" "),t("p",[e._v("Here's an example config")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("[Resolve]\nDNS=185.222.222.222 45.11.45.11 2a09:: 2a11::\nDNSOverTLS=yes\n")])])]),t("h3",{attrs:{id:"_3-restart-systemd-resolved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-restart-systemd-resolved"}},[e._v("#")]),e._v(" 3. Restart systemd-resolved")]),e._v(" "),t("p",[t("code",[e._v("systemctl restart systemd-resolved")])]),e._v(" "),t("h3",{attrs:{id:"_4-change-etc-resolv-conf"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-change-etc-resolv-conf"}},[e._v("#")]),e._v(" 4. Change /etc/resolv.conf")]),e._v(" "),t("p",[t("code",[e._v("vim /etc/resolv.conf")])]),e._v(" "),t("h3",{attrs:{id:"_5-set-nameserver-to-127-0-0-53"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-set-nameserver-to-127-0-0-53"}},[e._v("#")]),e._v(" 5. Set nameserver to 127.0.0.53")]),e._v(" "),t("p",[t("code",[e._v("nameserver 127.0.0.53")])]),e._v(" "),t("h3",{attrs:{id:"_6-test-if-dns-is-working"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-test-if-dns-is-working"}},[e._v("#")]),e._v(" 6. Test if DNS is working")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("root@server ~ # dig example.com\n\n; <<>> DiG 9.11.5-P4-5.1+deb10u5-Debian <<>> example.com\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63006\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 65494\n;; QUESTION SECTION:\n;example.com.\t\t\tIN\tA\n\n;; ANSWER SECTION:\nexample.com.\t\t3309\tIN\tA\t93.184.216.34\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.53#53(127.0.0.53)\n;; WHEN: Fri Jul 02 10:29:59 UTC 2021\n;; MSG SIZE  rcvd: 56\n")])])]),t("p",[e._v("We can see the resonse DNS server is "),t("code",[e._v("127.0.0.53#53(127.0.0.53)")]),e._v(", which is working fine.")])])}),[],!1,null,null,null);s.default=r.exports}}]);