networking – no internet connection, even after solving resolv.conf

I am using Ubuntu 17.10 and recently I have not been able to connect to the internet. I solved the problem by adding name server name server

in the /etc/resolv.conf file and the internet connection worked well
after rebooting, I had the same connection problem. In addition, for some reason, the / run / resolvconf directory no longer existed (etc / resolv.conf was previously a link to /run/resolvconf/resolv.conf). So I created this directory manually, created the resolv.conf file in this directory, put name server name server

in the file and make sure /etc/resolv.conf is a link to this file. then I executed

restarting the sudo service network manager

However, the internet connection still did not work.
I then checked the etc / resolv.conf file again to make sure it was not automatically reissued by a service and that it was still correct. How to solve the connection problem?