Article 4W98T "Network is unreachable" error on Kali Linux on Virtual Box VM on Mac OSX

"Network is unreachable" error on Kali Linux on Virtual Box VM on Mac OSX

by
EmileDiaz
from LinuxQuestions.org on (#4W98T)
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:~#*latest?d=yIl2AUoC8zA latest?i=1Rx19qRscEI:QPwxfrCPRXo:F7zBnMy latest?i=1Rx19qRscEI:QPwxfrCPRXo:V_sGLiP latest?d=qj6IDK7rITs latest?i=1Rx19qRscEI:QPwxfrCPRXo:gIN9vFw1Rx19qRscEI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments