Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 553  / 2 Years ago, wed, september 7, 2022, 9:19:37

Should I edit resolv.conf in my machine, or leave it 192.168.1.x and change something in the router? If in the router, how?


More From » dns

 Answers
0

If you need to modify the nameserver addresses (because, e.g., your router's nameserver is slow) you can set them in the NetworkManager's Connection Editor.



If you don't use NetworkManager then, in Ubuntu 11.10 or earlier, add a line to /etc/resolv.conf such as the following one.



nameserver 8.8.8.8


The address 8.8.8.8 is the IP address of a public DNS server provided by Google, but of course you can use any other good DNS server IP address.



In Ubuntu 12.04 or later you cannot edit /etc/resolv.conf directly because it is generated dynamically and any manual changes will be overwritten. (Actually /run/resolvconf/resolv.conf is overwritten and /etc/resolv.conf is a symbolic link to the latter.) Instead you include nameserver addresses along with other information about each network interface. Again, if you use NetworkManager to configure an interface (a "connection" in NM parlance) then enter nameserver addresses accessible over that interface into the Additional DNS servers field for that interface, using the Connection Editor. If you use the ifup program to configure an interface, add the addresses onto a dns-nameservers line in /etc/network/interfaces. And so on.


[#42985] Wednesday, September 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ouschee

Total Points: 485
Total Questions: 88
Total Answers: 106

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
;