Below are simple examples for different Linux distributions:
🟩 Debian / Ubuntu
Edit the resolv.conf file:
sudo nano /etc/resolv.confAdd or replace the nameserver line:
nameserver 62.210.0.1Save and exit (
Ctrl + O,Enter,Ctrl + X).To make it persistent across reboots (optional):
sudo apt install resolvconf -y echo "nameserver 62.210.0.1" | sudo tee /etc/resolvconf/resolv.conf.d/base sudo resolvconf -u
🟦 CentOS / AlmaLinux / Rocky Linux
Edit the network configuration:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0Add or update this line:
DNS1=62.210.0.1Restart networking:
sudo systemctl restart network
🟥 Fedora
Use NetworkManager CLI:
nmcli con mod "System eth0" ipv4.dns "62.210.0.1" nmcli con up "System eth0"
🟨 Arch Linux
Edit the resolv.conf file:
sudo nano /etc/resolv.confAdd:
nameserver 62.210.0.1Save and restart networking:
sudo systemctl restart systemd-networkd
✅ After saving, you can verify that DNS is working:
ping -c3 google.com
If the ping succeeds, your DNS setup is correct.