This guide will allow you to set custom DNS to help with networking issues.
Commands to run
Below is a block of code which will install OpenSSL and add the following DNS servers, 184.108.40.206 and 220.127.116.11 but these could be replaced with any DNS you would like to use.
- run: sudo apt-get update
- run: sudo apt-get install openssl
- run: sudo sed -i '12 i \ \ \ \ \ \ \ \ nameservers:' /etc/netplan/50-cloud-init.yaml
- run: sudo sed -i '13 i \ \ \ \ \ \ \ \ \ \ \ \ addresses:' /etc/netplan/50-cloud-init.yaml
- run: sudo sed -i "s/addresses:/ addresses":" [18.104.22.168, 22.214.171.124] /g" /etc/netplan/50-cloud-init.yaml
- run: cat /etc/netplan/50-cloud-init.yaml
- run: sudo netplan apply
- run: systemd-resolve --status | grep 'DNS Servers' -A2
When setting this the original DNS server will also be set so you will have three DNS servers defined that can be used.