Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...


The Categories



Stuff

Arma CodeList
GitHub Projects
Media (Gallery)
Privacy Policy
My Hardware
My Wishlist


April 26th at 2:30pm
Report a website issue
For best viewing experience use a 4k screen.

nethavn Logo

❬ Back to Blog


Fix DNS nameserver issues with resolvconf


Getting ping: google.ca: Temporary failure in name resolution or similar? Learn how to resolve it

Greetings guys,

this post will cover how you can easily fix the common DNS issue.

What do you need?

  • Linux DVD (e.g. debian install dvd / iso is fine)
  • sudo access or root access
  • access via shell (ssh or direct)

First: Insert your DVD into the cdrom drive or mount the ISO via /etc/fstab
Code for fstab could be: /home/depot/Images/template/iso/debian-9.6.0-amd64-DVD-1.iso /media/cdrom udf,iso9660 loop 0 0

Add the DVD to your repo via sudo apt-cdrom add

Edit the /etc/apt/sources.lsit and comment all repos out that lead to the internet as they cannot be resolved over DNS.

When done refresh the package list sudo apt-get update
Then install the resolvconf package sudo apt-get install resolvconf


Next step:

Add in the primary interface some nameservers:

sudo vi /etc/network/interfaces

dns-nameserver 1.1.1.1 8.8.8.8 8.8.4.4
Note that you can add as many as you want in a single line. If you have IPv6 too, just add another line into your IPv6 config too.

The config should like this then:

Once done you need to reload the interface:

sudo ifdown eno1 && sudo ifup eno1

Be sure to write this in one line otherwise your SSH connection will be lost.

After that resolvconf will get the new DNS servers and everything works again.



Over and Out,

Aebian