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.
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