How can I replace my DNS? I am not using a network manager, except for
wpa_supplicant for wireless, with
wpa_cli. I'm on Arch Linux, if it matters.
Although I can add DNS to my config,
systemctl restart systemd-resolved overwrites
/etc/resolv.conf (sym linked to
/run/systemd/resolve/resolv.conf), or a reboot, somehow add the default ISP DNS's to
/etc/resolv.conf. Does anyone know why, or how to resolve this issue to only use the DNS that I configured?
When I edit
/etc/resolv.conf to only contain
nameserver 22.214.171.124 nameserver 126.96.36.199
systemctl restart systemd-resolved or do a reboot, the default ISP DNS's are overwritten, and
cat /etc/resolv.conf is this:
# This file is managed by systemd-resolved(8). Do not edit. # # Third party programs must not access this file directly, but # only through the symlink at /etc/resolv.conf. To manage # resolv.conf(5) in a different way, replace the symlink by a # static file or a different symlink. nameserver 188.8.131.52 nameserver 192.168.1.1 nameserver 184.108.40.206 # Too many DNS servers configured, the following entries may be ignored. nameserver 220.127.116.11 nameserver 18.104.22.168
As described under
man resolved.conf, I ensured that I only have one config file,
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # See resolved.conf(5) for details [Resolve] DNS=22.214.171.124 126.96.36.199 #FallbackDNS=188.8.131.52 184.108.40.206 2001:4860:4860::8888 2001:4860:4860::8844 #LLMNR=yes
and no other files defining my DNS from all the configuration files under here:
/etc/systemd/resolved.conf /etc/systemd/resolved.conf.d/*.conf /run/systemd/resolved.conf.d/*.conf /usr/lib/systemd/resolved.conf.d/*.conf
I don't believe I am running any dhcpcd or netctl service either, and
systemctl | grep dhcpcd, and
systemctl | grep netctl returns nothing.