Kali Linux – Virtualbox – 2 network adapters (NAT & Host-Only) – dhcp

To make two network adapters in Kali Linux work with dhcp use the following configuration:

Edit /etc/network/interfaces
nano /etc/network/interfaces
Your config should look like this
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

Save your file by pressing [strg] + [x] and then press [y] and [Enter]

Reboot

It is possible that your interfaces are named different (maybe eth1 and eth2). Check this by running one of the following commands and customize your configuration according to the interface names

ifconfig

or

ip addr show

Leave a Reply

Your email address will not be published. Required fields are marked *