This project aims to change your linux default DNS resolver to Google public DNS.
Copy and paste this line on your shell:
curl -sSL "https://raw.githubusercontent.com/AlirezaBaratian/dns-changer/main/dns_changer.sh" | bash
Note that the script makes a backup of your current netplan config with the same name ending in .bak
The original motivation for this project was to fix Hetzner issue with some services such as, WhatsApp.
This script utilizes ovs and netplan. We update the .yml config file assossiated with netplan by adding Google public DNS resolvers - 8.8.8.8 and 8.8.4.4 - as the primary and secondary DNS resolvers of the whole system. Finally, the updated netplan configuration is applied.
Tested on Ubuntu 22.04 in Hetzner.
- Check to run as sudo for the whole script instead of wierd sudo commands