Come configurare OpenDNS o Google DNS su Ubuntu / Debian
La maggior parte dei desktop Ubuntu e Debian gestisce il DNS tramite NetworkManager. Puoi anche usare nmcli sui server.
Perché cambiare il DNS su Linux?
I resolver aziendali o dell’ISP a volte bloccano o gestiscono male le ricerche. Un DNS pubblico ripristina una risoluzione prevedibile.
Server DNS pubblici consigliati
- OpenDNS (Cisco): 208.67.222.222 / 208.67.220.220
- Google Public DNS: 8.8.8.8 / 8.8.4.4
- Cloudflare DNS: 1.1.1.1 / 1.0.0.1
Passaggi GUI (NetworkManager)
- Apri Impostazioni → Rete (o Wi‑Fi).
- Fai clic sull’icona a ingranaggio della connessione attiva.
- Apri la scheda IPv4. Imposta il metodo IPv4 su Automatico (DHCP) se necessario, poi il DNS su Manuale / disattiva DNS automatico se mostrato.
- Inserisci i server DNS 208.67.222.222, 208.67.220.220 oppure 8.8.8.8, 8.8.4.4 nel formato richiesto dall’interfaccia.
- Applica e attiva/disattiva la connessione.
- CLI opzionale: nmcli connection modify "CONNECTION_NAME" ipv4.dns "8.8.8.8 8.8.4.4" ipv4.ignore-auto-dns yes && nmcli connection up "CONNECTION_NAME".
Svuotare il DNS con systemd-resolved
Ubuntu usa systemd-resolved per impostazione predefinita nelle versioni recenti.
sudo resolvectl flush-caches
- Apri un terminale.
- Esegui sudo resolvectl flush-caches
- Controlla lo stato con resolvectl status | head.
- Riprova il sito web.
Verifica che abbia funzionato
Usa dig example.com o resolvectl query example.com per confermare quale server ha risposto.
Guide DNS correlate
- Come configurare OpenDNS o Google DNS su Windows 11
- Come configurare OpenDNS o Google DNS su Windows 10
- Come configurare OpenDNS o Google DNS su Windows 8
- Come configurare OpenDNS o Google DNS su Windows 7
- Come configurare OpenDNS o Google DNS su Windows Vista
- Come configurare OpenDNS o Google DNS su Windows XP
- Come configurare OpenDNS o Google DNS su macOS
- Come configurare OpenDNS o Google DNS su Fedora / RHEL
- Come configurare OpenDNS o Google DNS su Android
- Come configurare OpenDNS o Google DNS su iPhone e iPad
- Come configurare OpenDNS o Google DNS su ChromeOS
- Come configurare OpenDNS o Google DNS sul router