LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2019, 09:04 AM   #1
EmileDiaz
LQ Newbie
 
Registered: Dec 2019
Posts: 3

Rep: Reputation: Disabled
"temporary failure in name resolution" error- (Kali Linux on VB on a MacBook Air)


I am working in Kali Linux on VirtualBox on a Macbook Air

I have this persistent issue I am unable to solve. Usually after a reboot, I am unable to access the web via the Kali browser. Also at the same time I am unable to ping a URL in the kali terminal (as in "ping www.google.com") I get a "temporary failure in name resolution" error in the terminal. I am however able to ping an IP address without an issue. So whatever the issue is, it is failing to resolve the urls.

Of course that means that I am also unable to install or update anything on Kali, since Github and other links use URLs rather than IPs for their software repositories, which of course makes sense.

I know the root cause lies somewhere in the resolv.conf file. (At the moment it only reads "nameserver 8.8.8.8")

But I am utterly unable to make any solution stick permanently. My searches have shown that this is perhaps resolv.conf file is recreated each time by Network Manager on restart (Or something like that) I've tried a few solutions that worked for a bit but then stopped working.

I've tried so many solutions that I am afraid I may have messed up the resolv files or directories. So even an image or view of what the directories and the files are supposed to look like may help. (For example, what precisely do I need to have inside of the resolv.conf file?)

Since I can't seem to locate how to add an image to my post, I will try and describe what my current file and directory state looks like: (Focusing only on the resolv files)

Under /etc I have the following three items:

1. "resolv.conf" # a document that reads "nameserver 8.8.8.8"

2. "resolvconf" # a directory that contains two directories named "update.d" and "update-libc.d" Furthermore "update.d" directory contains a document "dnsmasq" and "update-libc.d" directory contains a document called "avahi-daemon"

3. "resolv.conf-original" # a document that reads "nameserver 8.8.8.8" and was possibly made during one of my failed solutions.

I've not messed with the "dnsmasq" or the "avahi-daemon" documents and pretty sure I have not altered any directories. I've only edited the "resolv.conf" document to add that line "nameserver 8.8.8.8" as was suggested on some linux sites, but that's about it.

Sorry for such a messy and long post. But I am desperate for help.

Thanks to anyone in advance who responds.

Emile
 
Old 12-09-2019, 02:23 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,133

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
Originally Posted by EmileDiaz View Post
So whatever the issue is, it is failing to resolve the urls.
yes, that's it.
Quote:
I know the root cause lies somewhere in the resolv.conf file. (At the moment it only reads "nameserver 8.8.8.8")
That should work (but only if there are no quote characters in the file). 8.8.8.8 is a public nameserver made available by Google (turn the 8's by 90 degrees, and you get googol characters). If you can reach 8.8.8.8, you should be able to resolve names.
Quote:
(For example, what precisely do I need to have inside of the resolv.conf file?)
Use the resolv.conf man page and one of the trillions of tutorials on the internet to get an answer. "nameserver 8.8.8.8" should suffice.

resolvconf is a program that modifies resolv.conf based on, for example, DHCP responses. If resolv.conf is correct, and it is, you shouldn't have to worry about resolvconf.

So the question is, if resolv.conf points to Google's DNS server, why can't you resolve domain names? This is puzzling indeed.

EDIT: /etc/nsswitch.conf usually configures domain name resolution to use both the /etc/hosts file and DNS as follows:
Code:
hosts:      files dns
If you remove dns from the configuration, /etc/resolv.conf is simply ignored.

Last edited by berndbausch; 12-09-2019 at 02:51 AM.
 
Old 12-09-2019, 02:54 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,413
Blog Entries: 9

Rep: Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659Reputation: 3659
Duplicate of https://www.linuxquestions.org/quest...sx-4175665635/ ???
 
Old 12-09-2019, 03:17 PM   #4
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,376

Rep: Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551Reputation: 1551
This is a dup...but I'm compelled to point out that networking is turned off by default in Kali.
If the OP doesn't know that, and doesn't know how to enable it, they probably shouldn't be using Kali at all. It's not for beginners.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet : Temporary failure in name resolution : Host name lookup failure koodoo Linux - Newbie 10 02-11-2008 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration