When do you need to install, when your server can’t resolve internet domain names?
Step 1: Install the resolver, if it is not already installed
1 2 | sudo apt update |
1 2 | sudo apt install resolvconf |
Step 2: Check if the resolvconf service is started and enabled
1 2 | sudo systemctl status resolvconf.service |
Step 3: If the service is not already enabled, you can start and enable it with the following commands:
1 2 | sudo systemctl start resolvconf.service |
1 2 | sudo systemctl enable resolvconf.service |
Step 4: Now edit the configuration file resolv.conf.d/head and add google DNS address there 8.8.8.8 and 8.8.4.4
1 2 | sudo nano /etc/resolvconf/resolv.conf.d/head |
Step 5: Now restart the resolvconf configuration
1 2 | sudo resolvconf --enable-updates |
Step 6: run the update again
1 2 | sudo resolvconf -u |
Step 7: Now if you check the contents of the resolv.conf file with the following command
1 2 | cat /etc/resolv.conf |
Step 8: Check the configuration again, if correct, restart DNS with the command
1 2 3 | sudo systemctl restart resolvconf.service sudo systemctl restart systemd-resolved.service |
So you have installed google DNS for your ubuntu server, thank you for following the article, wish everyone an energetic day.