Linux: DNS replacement in systemd.

On Linux running systemd, DNS replacement is ① In /etc/systemd/resolved.conf, where it is commented out as# DNS =

[Resolve]
DNS=8.8.8.8

Specify the IP address of the DNS server, as in ②

systemctl restart systemd-resolved

And apply.

systemd-resolve --status

So, check.

Unclear point

The default DNS is systemd-resolve --status, which didn't come out first.

The resolver provided by systemd is local 127.0.0.53 # 53, even if you search for the name with nslookup

$ nslookup facebook.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	facebook.com
Address: 31.13.82.36
Name:	facebook.com
Address: 2a03:2880:f10f:83:face:b00c:0:25de

Only comes out. Perhaps, if you follow steps ①, ②, and ③, you will be able to call the DNS server that was rewritten inside systemd-resolved.

Recommended Posts

Linux: DNS replacement in systemd.
[Linux] DNS settings
Linux permissions in Java
Seurat in Linux (installation)
DNS server in Python ....
SSH restrictions in Linux environment
Run Amazon Linux 2 in VirtualBox
Handle dates in Linux bash commands
Install tensorflow in Docker (LINUX) (memo)
Put only kubectl in Amazon Linux 2
Replacement of strings containing Linux spaces
Linux command (basic in basic) personal memo
Change font size in Serene Linux