I have this resolv.conf
even after disconnecting from VPN server (connection was established using openvpn --config <path>.ovpn
):
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers
nameserver 10.4.X.X
nameserver 10.4.Y.Y
nameserver 127.0.0.53
search Z.ac.in
I want to get rid of search Z.ac.in
and the 10.4
ns. However, I can't find them in /etc/resolvconf/resolv.conf.d/{head,base,tail}
. I even did grep 10.4.X.X
inside the /etc/resolvconf
directory with no result. Similarly, my /etc/network/interfaces
file is mostly empty:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
For now I have just been restarting my pc to remove them. But how to remove them properly from the resolv.conf file?
sudo openvpn --config <path>.ovpn
. Version information:OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
up /etc/openvpn/update-resolv-conf
orup /etc/openvpn/update-systemd-resolved
, make sure you have openvpn client call the script when you disconnect, with adown /etc/...
.