7

DNS , . . , DNS , DNS .

    DNS  Linux

DNS- ?

DNS- DNS , , . , DNS , .

. , - . DNS , . , MSNBC 100 . , 10 , .

DNS , . , - , DNS . .

, system-resolved DNSSEC DNSoverTLS DoT. .


?

systemd-resolved. systemd. systemd, Linux , systemd-resolved, . .

systemd-resolved DNS-, . , DNS .


systemd-resolved?

, Ubuntu 19.04, systemd-resolved.

systemd-resolved, - . , NetworkManager, .

systemd-resolved:

$ resolvectl status

, systemd-resolved:

$ resolvectl status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

, - , systemd-resolved :

Global
       LLMNR setting: yes
MulticastDNS setting: yes
  DNSOverTLS setting: opportunistic
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
  Current DNS Server: 1.1.1.1
         DNS Servers: 1.1.1.1
                      1.0.0.1

systemd-resolved

systemd-resolved , systemd. . :

$ sudo systemctl start systemd-resolved.service

, .

$ sudo systemctl enable systemd-resolved.service

DNS , . , , DNSSEC DoT:

Google Public DNS

8.8.8.8
8.8.4.4

Cloudflare Public DNS

1.1.1.1
1.0.0.1

systemd-resolved :

$ sudo nano /etc/systemd/resolved.conf

, :

#DNS=

. Cloudflare Public DNS:

DNS=1.1.1.1 1.0.0.1

systemd-resolved:

$ sudo systemctl restart systemd-resolved.service

, systemd-resolved DNS , .


systemd-resolved

DNS . . , . , /etc/resolv.conf.

/etc/resolv.conf IP , . .

, /run/systemd/resolve/stub-resolv.conf. /etc/resolv.conf systemd-resolved.

, /etc/resolv.conf. /etc/resolv.conf , . , , /etc/resolv.conf IP 127.0.0.53.


. /etc/resolv.conf. ,

.
$ sudo mv /etc/resolv.conf /etc/resolv.conf.original

:

$ sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

systemd-resolved:

$ sudo systemctl restart systemd-resolved.service

, , system-resolved . /etc/resolv.conf :

$ sudo nano /etc/resolv.conf

, nameserver :

nameserver 127.0.0.53

. , DNS 127.0.0.53.


systemd-resolved

, DNS . systemd-resolved, .

systemd-resolved , . :

$ sudo systemctl edit systemd-resolved.service

:

[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

systemd-resolved . journald:

$ sudo journalctl -f -u systemd-resolved

, Using DNS server , DNS . DNS Cloudflare

Using DNS server 1.1.1.1 for transaction 19995.

Cache miss , :

Cache miss for example.com IN SOA

Positive cache , systemd-resolved :

Positive cache hit for example.com IN A

, . :

$ sudo systemctl edit systemd-resolved.service

.


DNS

systemd-resolved DNS , DNSSEC DNSoverTLS. , DNS (DNSSEC) (DoT).

system-resolved:

$ sudo nano /etc/systemd/resolved.conf

:

DNSSEC=allow-downgrade
DNSOverTLS=opportunistic

systemd-resolved.

$ sudo systemctl restart systemd-resolved.service

DNS DNS . DNS Google CloudFlare .


DNS . , DNS .


>