I am currently running Kali as a virtualbox on my Mac. I want to have it set up so that the VM can access the internet, as well as being connected to the host OS (so I can connect over SSH, etc.)
Currently, Adapter 2
is host only, and is working fine. I can SSH into Kali from my host OS. Adapter 1
is set up as a NAT, but it is not working and so I cannot connect to the internet.
When I do ping google.com
, I get:
ping: google.com: Name or service not known
On Kali I have the following settings in /etc/network/interfaces
:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.0.2.15
netmask 255.255.255.0
gateway 10.0.2.2
allow-hotplug eth1
iface eth1 inet static
address 192.168.100.101
netmask 255.255.255.0
eth1
is the Adapter 2 (Host-Only)
Also, the results of route -n
are:
Does my issue lie in the addresses I have given eth0
? Where have I gone wrong?