I see that you're already trying to use the solution described here:
https://unix.stackexchange.com/questions/280264/no-dns-resolution-after-upgrade-from-ubuntu-14-04-to-16-04
While not ideal, a work-around would be to automatically run your commands on boot. This page includes some methods of doing that:
http://linuxtechlab.com/executing-commands-scripts-at-reboot/
Another possibility is that you're affected by the bug in the March 2017 update:
https://www.digitalocean.com/community/questions/how-to-fix-the-march-2017-ubuntu-dns-resolution-issues
Another very thorough answer appears here:
16.10 fail to resolve DNS
I don't know enough about your precise circumstances to advise a particular one of these to try first, but hopefully one of them will work for you.
Update: Based on the knowledge that it's failing when the server reboots with a non-standard VPN client up, it's reasonable to assume that this VPN client could be modifying resolv.conf and removing some of the default entries in an attempt to avoid DNS leakage. I would recommend then making sure that your VPN client is disconnected before shutdown, and possibly still automatically resetting the resolv.conf after boot.
Alternatively, you could try adding a legitimate nameserver of your choice, such as nameserver 8.8.8.8
to the file /etc/resolvconf/resolv.conf.d/head
, which might help. I am not sure if this will affect functionality of your VPN or not, or cause DNS leaking, so use it cautiously. Source:
https://ubuntuforums.org/showthread.php?t=2352821&page=2