LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2019, 05:42 PM   #1
EmileDiaz
LQ Newbie
 
Registered: Dec 2019
Posts: 3

Rep: Reputation: Disabled
"Network is unreachable" error on Kali Linux on Virtual Box VM on Mac OSX


Hi all:

New to Kali Linux and this forum. I am running Kali on a VirtualBox on a mac laptop.

I'm unable to ping a url or an ip. I get either a ""Temporary failure in name resolution" or "Network is unreachable" when I try various network queries. Seems like I either don't have a proper DNS configured or something else perhaps

I am posting details of some basic info below that I did to see what the "/etc/hosts" and "etc/resolv.conf" files contain. Also I did some looking to see what the "ip a" or "ifconfig" bring up. Particularly worrisome was the" route -n" query (see below) which brought up nothing under the headings of "Destination" "Gateway" "Genmask" etc...That all looks wrong but I don't know enough to fix it.

When I try and set the ip of my router for eth0 is when I get the "network is unreachable" error.

Perhaps someone can read the details below and help.

Many thanks.

Please see code below:

Code:
root@kali:~# cat /etc/hosts
127.0.0.1 * * * localhost
127.0.1.1 * * * kali
# The following lines are desirable for IPv6 capable hosts
::1 * * localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

root@kali:~# cat /etc/resolv.conf
nameserver 8.8.8.8

root@kali:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
* * link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
* * inet*127.0.0.1/8*scope host lo
* * * *valid_lft forever preferred_lft forever
* * inet6 ::1/128 scope host
* * * *valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
* * link/ether 08:00:27:06:50:51 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
* * link/ether 48:02:2a:b1:0f:a7 brd ff:ff:ff:ff:ff:ff

root@kali:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> *mtu 65536
* * * * inet 127.0.0.1 *netmask 255.0.0.0
* * * * inet6 ::1 *prefixlen 128 *scopeid 0x10<host>
* * * * loop *txqueuelen 1000 *(Local Loopback)
* * * * RX packets 4 *bytes 240 (240.0 B)
* * * * RX errors 0 *dropped 0 *overruns 0 *frame 0
* * * * TX packets 4 *bytes 240 (240.0 B)
* * * * TX errors 0 *dropped 0 overruns 0 *carrier 0 *collisions 0

root@kali:~# route -n
Kernel IP routing table
Destination * * Gateway * * * * Genmask * * * * Flags Metric Ref * *Use Iface
root@kali:~#*
 
Old 12-08-2019, 06:08 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
If you plan to use Kali to learn computer forensics/penetration testing, I would suggest that you bookmark and read their excellent documentation. THe networking issue should be explained at the page below at the Kali doc site.

https://www.kali.org/docs/policy/kal...vice-policies/
 
Old 12-08-2019, 07:05 PM   #3
EmileDiaz
LQ Newbie
 
Registered: Dec 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
If you plan to use Kali to learn computer forensics/penetration testing, I would suggest that you bookmark and read their excellent documentation. THe networking issue should be explained at the page below at the Kali doc site.

https://www.kali.org/docs/policy/kal...vice-policies/
yancek: Ok so your post was extremely helpful. I get it:

Code:
"Kali Linux, as a standard policy, will disallow network services from persisting across reboots by default"
So fine, that explains why after every reboot I had the same issue remerge.

I was able to fix all of my networking issues by:

Code:
sudo dhclient eth0
For the moment I have to do this at every reboot.

But again, as your very helpful link says that I can make the service persist by the following command:

Code:
systemctl enable
But what service exactly should I enable to persist? Sorry, but I am a newbie!

Or as the link says:

Code:
Service whitelists and blacklists can be found in the /usr/sbin/update-rc.d file.
So perhaps I can add the service to the whitelist to persist across reboots.

But can you or anyone help with exactly what service I would enable or whitelist.

Thanks again for the link. It was eye-opening.
 
Old 12-09-2019, 01:54 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Duplicate of https://www.linuxquestions.org/quest...ir-4175665605/ ???
 
  


Reply



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
Failed to fetch http://http.kali.org/kali/dists/kali/Release.gpg aymeric75 Linux - General 2 07-11-2015 05:10 AM
Mac OSX Host - RHEL 6.4 Guest - Virtual Box can't talk to network boyd98 Linux - Networking 9 01-24-2014 07:12 PM
[SOLVED] Problems booting Kali in Vbox Mac-osx testera1 Linux - Newbie 2 10-16-2013 06:34 PM
Booting Kali in VirutualBox on Mac osx testera1 Linux - Software 3 10-02-2013 06:06 PM
tftp - "Destination Unreachable" due to "Port Unreachable" renjithgopal Linux - Security 5 07-24-2003 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:02 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
Open Source Consulting | Domain Registration