Cara mengatur OpenDNS atau Google DNS di Ubuntu / Debian
Sebagian besar desktop Ubuntu dan Debian mengelola DNS melalui NetworkManager. Anda juga dapat menggunakan nmcli di server.
Mengapa mengubah DNS di Linux?
Resolver korporat atau ISP terkadang memblokir atau salah menangani lookup. DNS publik memulihkan resolusi yang dapat diprediksi.
Server DNS publik yang direkomendasikan
- 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
Langkah GUI (NetworkManager)
- Buka Settings → Network (atau Wi‑Fi).
- Klik ikon roda gigi pada koneksi aktif.
- Buka tab IPv4. Setel IPv4 Method ke Automatic (DHCP) jika perlu, lalu setel DNS ke Manual / nonaktifkan Automatic DNS jika ditampilkan.
- Masukkan server DNS 208.67.222.222, 208.67.220.220 atau 8.8.8.8, 8.8.4.4 sesuai format UI Anda.
- Apply dan matikan/nyalakan koneksi.
- Opsional CLI: 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".
Flush DNS di systemd-resolved
Ubuntu menggunakan systemd-resolved secara default di rilis terbaru.
sudo resolvectl flush-caches
- Buka terminal.
- Jalankan sudo resolvectl flush-caches
- Periksa status dengan resolvectl status | head.
- Coba lagi situs web.
Verifikasi berhasil
Gunakan dig example.com atau resolvectl query example.com untuk mengonfirmasi server mana yang menjawab.
Panduan DNS terkait
- Cara mengatur OpenDNS atau Google DNS di Windows 11
- Cara mengatur OpenDNS atau Google DNS di Windows 10
- Cara mengatur OpenDNS atau Google DNS di Windows 8
- Cara mengatur OpenDNS atau Google DNS di Windows 7
- Cara mengatur OpenDNS atau Google DNS di Windows Vista
- Cara mengatur OpenDNS atau Google DNS di Windows XP
- Cara mengatur OpenDNS atau Google DNS di macOS
- Cara mengatur OpenDNS atau Google DNS di Fedora / RHEL
- Cara mengatur OpenDNS atau Google DNS di Android
- Cara mengatur OpenDNS atau Google DNS di iPhone & iPad
- Cara mengatur OpenDNS atau Google DNS di ChromeOS
- Cara mengatur OpenDNS atau Google DNS di router