I prefer the Google DNS servers (18.104.22.168/22.214.171.124) for faster DNS resolution. While the procedure to set it on Unity is trivial, setting it on LXDE needs little more effort.
- Edit /etc/NetworkManager/NetworkManager.conf and comment out the line starting with dns.
- Edit /etc/resolv.conf and add the preferred nameservers before any other entries.
- Reboot and ensure the settings took effect.
$ nslookup www.google.com
This procedure is tested on Ubuntu 14.04 (aka Trusty Tahr).
If you are interested in getting your own domain name for free you can try the following two options depending on the type of hosting you have:
- co.nr: If you have your site hosted somewhere other than your own storage co.nr is a good option. You can register a domain name like mypage.co.nr. It is free with some basic mandates. No Ads. co.nr also supports if you have your site hosted in your own computer but I liked the second option more for this scenario.
- noip.com: If your system is on 24×7 this is the free service you can opt for. It works whether your IP is static of dynamic. It has it’s own client software for Linux, Windows and Mac which pings back to update the IP. No Ads.
My ISPs DNS server responds slowly. So I was trying to modify /etc/resolv.conf on Ubuntu 12.04 with Google’s DNS server IPs (126.96.36.199, 188.8.131.52) as usual. To make the change permanent I ran chattr +i on the file but it failed. I found that in Ubuntu 12.04 it is a symbolic link to the following file:
/run/resolvconf/resolv.conf and /run is mounted as tmpfs in RAM.
Simple solution to add the DNS IPs using the GUI:
NetworkManager (in taskbar) ▸ Edit Connections… ▸ Select used connection ▸ Edit… ▸ IPv4 Settings ▸ Method: Automatic (DHCP) addresses only [if your conneciton is DHCP based, otherwise select Manual] ▸ Add the IPs (separated by comma) in DNS servers: field.
Quick tip: If you are using ADSL modem, you can set the Primary and Secondary DNS in the modem. Most modems support it nowadays.