Create a file called /etc/resolv.conf write fill in the contents:
For example if your want to use googles dns-service:
This is likely caused by DHCP configuration when you first installed Ubuntu. Try this 3-step process to handle this auto configuration issue.
Edit your interface configuration, which is located in: /etc/network/interfaces
Add this line below iface lo inet loopback:
dns-nameservers yourdns youraltdns
18 Maret 2019