[SinglePic not found]Bisogna editare il file /etc/resolv.conf:
- sudo gedit /etc/resolv.conf;
- aggiungere:
nameserver 208.67.222.222
nameserver 208.67.220.220; - salvare il file.
Per testare questa configurazione digitare uno dei seguenti comandi:
$ host google.com
$ dig google.com
$ ping google.com
$ nslookup your-domain.com
Se l’output è valido (come nell’esempio sotto riportato) oppure si è in grado di fare ping al server remoto via hostname allora significa che il DNS funziona correttamente.
Output di host google.com dal mio terminale:
google.com has address 64.233.167.99
google.com has address 72.14.207.99
google.com has address 64.233.187.99
google.com mail is handled by 10 smtp2.google.com.
google.com mail is handled by 10 smtp3.google.com.
google.com mail is handled by 10 smtp4.google.com.
google.com mail is handled by 10 smtp1.google.com.
Originally posted 2007-12-30 14:48:27. Republished by Blog Post Promoter



[...] Settare il DNS da linea di comando. In: Informatica Author: Esterno [SinglePic not found]Bisogna editare il file /etc/resolv.conf: sudo gedit /etc/resolv.conf; aggiungere: nameserver 208.67.222.222 nameserver 208.67.220.220; salvare il file. Per testare questa configurazione digitare uno dei seguenti comandi: $ host google.com $ dig google.com $ ping google.com $ nslookup your-domain.com Se l’output è valido (come nell’esempio sotto riportato) oppure si è in grado di fare ping al server remoto via hostname allora significa che il DNS funziona correttamente. Output di host google.com dal mio terminale: google.com has addre… [...]
In questo modo però al riavvio della macchina i dns impostati andranno persi.
Nel file resolv.conf c’è scritto : “DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN”
Per risolvere, installare resolvconf e modificare il file /etc/resolvconf/resolv.conf.d/base come fatto per il file resolv.conf
(es : nameserver 208.67.222.222)
Oppure inserire es: “dns-nameservers 208.67.222.222″ nel file /etc/network/interfaces, sotto l’interfaccia utilizzata es: eth0