======How to add dns servers to Gentoo Linux behind a DHCP server====== (and probably other Linuces, too) Open ##/etc/resolv.conf## with your editor of choice (emacs, vi, nano...). It should read like: %%(/etc/resolv.conf) # Generated by dhcpcd from # /etc/resolv.conf.head can replace this line domain nameserver # /etc/resolv.conf.tail can replace this line %% close the editor. The server will take its domain and dns server from a dhcp server. DNS servers will be asked from top to bottom. It is resolv.conf.head we want. Control the resolv.conf before writing one, however; there you find instructions on where to add static content (hopefully). Look up [[http://www.opennicproject.org/nearest-servers/ | your nearest openNIC servers]] or put in static ones. #%emacs /etc/resolv.conf.head#% (or the file resolv.conf pointed you to with your editor of choice) %%(/etc/resolv.conf.head) nameserver 87.98.242.252 nameserver 46.105.212.15 nameserver 108.61.210.58 nameserver 62.113.200.106 rotate %% (or the nearest nameserver from you) If you have static IP, take a look at [[http://forums.gentoo.org/viewtopic-p-7085734.html | http://forums.gentoo.org/viewtopic-p-7085734.html]]. debian resolvconf is explained here: [[http://www.opennicproject.org/configure-your-dns/how-to-configure-a-pppoe-internet-connection-on-a-debian-box/ | http://www.opennicproject.org/configure-your-dns/how-to-configure-a-pppoe-internet-connection-on-a-debian-box/]] Now restart your interface (or remove the network cable and put it back in, or switch wlan off and on): #%/etc/init.d/net. restart#% If you are using systemd, my condolences, and use the appropriate tools. After the interface is back up, check: #%gview /etc/resolv.conf#% Your /etc/resolv.conf.head now should be inserted into /etc/resolv.conf Now is the time for a check of the OpenNIC tlds. Follow this link. If it works, you are successful: [[http://grep.geek/ | http://grep.geek/]] Happy browsing!