My goal is to configure DNS servers on the client side.
I was following the guide at: https://help.ubuntu.com/lts/serverguide/network-configuration.html#name-resolution.
My /etc/network/interfaces
looks nothing like the example in the guide.
When I cat /etc/network/interfaces
, I get:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
and nothing else...
I did the following, and it solved my issue:
/etc/network/interfaces
, including these lines:dns-nameservers 192.168.1.2
dns-search example.com
sudo ifconfig enp4s0 down && sudo ip addr flush dev enp4s0 && sudo ifconfig enp4s0 up
cat /etc/resolv.conf
Name servers and search domain should be present.