My ISP's DNS server has problems resolving lots of important websites like google, github, gmail etc. As a hack I manually edited the /etc/resolv.conf file to Google's 22.214.171.124. But the changed file remodifies to my ISP's DNS service when there's a network change. How do I automatically set /etc/resolv.conf to Google's DNS in the event of a network change and when I restart my computer using bash scripting.
I'm new to scripting on Linux. I'd need pointers on how to go about writing a script for this. Thanks.