Date created: Saturday, May 22, 2021 11:09:41 AM. Last modified: Thursday, June 20, 2024 9:20:23 AM

DNS

Arch

Clear DNS cache:

sudo systemctl restart nscd

 

Debian

Clear DNS cache:

sudo service network-manager restart

 

Ubuntu 18 + Ubuntu 20

Show DNS server:

nmcli device show <interfacename> | grep DNS

 

Show statistics:

$ sudo systemd-resolve --statistics
DNSSEC supported by current servers: no

Transactions
Current Transactions: 0
Total Transactions: 1036

Cache
Current Cache Size: 24
Cache Hits: 535
Cache Misses: 678

DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0

 

Clear DNS cache:

sudo systemd-resolve --flush-caches

$sudo systemd-resolve --flush
$ sudo systemd-resolve --statistics
DNSSEC supported by current servers: no

Transactions
Current Transactions: 0
Total Transactions: 1044

Cache
Current Cache Size: 2
Cache Hits: 535
Cache Misses: 686

DNSSEC Verdicts
Secure: 0
Insecure: 0
Bogus: 0
Indeterminate: 0

 

Ubuntu 22

Show DNS server(s):

$ resolvectl status
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: uplink

Link 2 (eth0)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: fd:0:0:1::2

 

Flush DNS:

sudo resolvectl flush-caches