How to use Google DNS in Ubuntu/Debian permanently

Few weeks ago in one of the servers we faces strange issue: The website couldn’t send emails using remote SMTP.

First i thought it was related to SMTP port, credentials etc. – but everything was OK there. So then i tries to ping and got surprised. It wasn’t worked. Simple ping didn’t work.

So it was obviously corrupted DNS issue.

First i tried the easier way, which is recommended by, adding Google DNS IP addresses to resolv.conf file

sudo vi /etc/resolv.conf

But it didn’t help.

So i decided to go into deeper and solving it using netplan.

Continue reading “How to use Google DNS in Ubuntu/Debian permanently”