How to set DNS Servers on Raspberry Pi

dnsopendnsraspberry pi

I want my Raspberry Pi to use OpenDNS to resolve domain names. How can I modify this setting?

Best Answer

If you are using Debian on Raspberry Pi, then you need to edit /etc/resolv.conf

nano /etc/resolv.conf

then add the server IP of the openDNS

nameserver  208.67.222.222
nameserver 208.67.220.220

Btw, if you have any concern about speed of the DNS you may want to take a look at this post