I used resolv.conf to set nameserver and search because of VPN but it wasn't right solution even before Ubuntu 18 (because it is not used only for VPN but for all connections). Better solution is using openvpn-systemd-resolved and this solution works for me.
resolv.conf. The first step in testing BIND9 is to add the nameserver’s IP Address to a hosts resolver. The Primary nameserver should be configured as well as another host to double check things. Refer to DNS client configuration for details on adding nameserver addresses to your network clients. How to configure 'resolv.conf' in Ubuntu permanently? When There are 3 ways you can do this: 1. The most elegant solution is to use DHCP and setup the DHCP server to send you whatever DNS server you want. 2. Use network-manager, System -> Preferences -> Network connections - click no network interface, Resolvconf Download (DEB, RPM, XZ, ZST) - pkgs.org
Mar 18, 2015
DESCRIPTION The resolvconf package comprises a simple database for run-time nameserver information and a simple framework for notifying applications of changes in that information. Resolvconf thus sets itself up as the intermediary between programs that supply nameserver information and applications that use that information. Ubuntu Manpage: resolvconf — a framework for managing DESCRIPTION resolvconf manages resolv.conf (5) files from multiple sources, such as DHCP and VPN clients. Traditionally, the host runs just one client and that updates /etc/resolv.conf. More modern systems frequently have wired and wireless interfaces and there is … networking - How to prevent /etc/resolv.conf from getting
resolv.conf - resolver configuration file SYNOPSIS /etc/resolv.conf DESCRIPTION The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are …
May 14, 2019 Wrong nameserver set by resolvconf and - Ask Ubuntu First, change /etc/resolv.conf by setting the desired nameserver: # nano /etc/resolv.conf Set, for instance, nameserver 8.8.8.8 And then do # chattr +i /etc/resolv.conf This protects /etc/resolv.conf file so that no one can modify it including root user. Ubuntu Manpage: resolvconf.conf — resolvconf configuration