0

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
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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:127.0.0.1  Mask:255.0.0.0
          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)

root@kali:~# 

Where has the IP address gone?

slm
  • 363,520
  • 117
  • 767
  • 871
  • This is strange. Did you hard reboot your VM? – shivams May 22 '15 at 01:09
  • @shivams, what is hard reboot? I directly went to power-off. –  May 22 '15 at 09:36
  • @shivams, actually that didn't matter. I tested it again by properly shutting down and starting again. Same problem. –  May 22 '15 at 09:50
  • Hard reboot is nothing but shutting down your machine properly and then starting it again. – shivams May 22 '15 at 09: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 09:55

1 Answers1

1

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

     ONBOOT="yes"
     NM_CONTROLLED="no"

Then reboot your machine.

SomeGuy
  • 231
  • 2
  • 13