I've got a VPS and I can't use curl, ping, etc. So I asked VPS support what's my problem and he said you should set DNS properly in etc/resolv.conf and configure nameservers.
Thus my question is how should I edit it and know what the nameservers are?
Maybe my question pretends silly but I'm newbie to Ubuntu and network. So I appreciate any response.
1 Answer
Nameservers play an essential role in directing traffic on the Internet by helping to connect your domain name with the IP address of your web server. To do this, they help web browsers and other services access your domain's DNS records.
From this link
To edit /etc/resolv.conf the file will be overwritten by the system, but it's still possible to edit /etc/resolv.conf
First to install resolvconf with:
sudo apt install resolvconfEdit the /etc/resolv.conf, you can remove lines or add lines, this is a example of a nameserver line:
nameserver x.x.x.x # x.x.x.x can be like 8.8.8.8(chrome's DNS) Then edit the file /etc/resolvconf/resolv.conf.d/head and add the lines from /etc/resolv.conf you edited. Finally you run:
sudo resolvconf -u 1