I have setup Kali Linux in OracleVM.

When I installed the OS, its network type was NAT. But, when I changed that to HostOnlyNetwork, it is not finding its IP address.

Now when I changed it back to NAT, it is not connecting to the Internet.

How to solve this problem?

ifconfig terminal output:

root@kali:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:00:5a:0a  
          inet6 addr: fe80::a00:27ff:fe00:5a0a/64 Scope:Link
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:3564 (3.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:732 (732.0 B)  TX bytes:732 (732.0 B)


Where has the IP address gone?

  • This is strange. Did you hard reboot your VM? – shivams May 22 '15 at 1:09
  • @shivams, what is hard reboot? I directly went to power-off. – user109285 May 22 '15 at 9:36
  • @shivams, actually that didn't matter. I tested it again by properly shutting down and starting again. Same problem. – user109285 May 22 '15 at 9:50
  • Hard reboot is nothing but shutting down your machine properly and then starting it again. – shivams May 22 '15 at 9:53
  • How about you try deleting the virtual machine but NOT ITS VIRTUAL HARD-DISK? Seems like some settings in your virtual machine have got messed up. Just delete it and create a new one using the same virtual hard-drive. Just beware that while deleting virtual machine, do not delete the virtual drive. – shivams May 22 '15 at 9:55

This same problem has been covered here:

CentOS no network interface after installation in VirtualBox

Although this changes due to the "host only," the cause/effect seems to be the same and is pretty common with new installs.

NOTE - the Link says "CentOS," but it's actually Ubunutu in the post, which is DEban as is Kali.

Cliff notes of the post is either to:

1) Use $ nm-connection-editor to open up the GUI for the network. Walk through the prompts provided based on your network, or: 2)use vi /etc/sysconfig/network-scripts/ifcfg-eth0 and change to


Then reboot your machine.

  • While what you say appears as a valid possibility, it would justify flagging the question as a duplicate instead of answering it. – Julie Pelletier Jul 4 '16 at 5:01
  • not sure if I even have enough points to do this - was just trying to be helpful :) – SomeGuy Jul 4 '16 at 5:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy