Sitemap

Kali Linux in VirtualBox: Unable to Ping? Step-by-Step Fix Guide

3 min readJun 9, 2026

--

Press enter or click to view image in full size
Photo by Vishnu Mohanan on Unsplash

If you are running Kali Linux inside VirtualBox and cannot ping anything (gateway, internet, or local hosts), this guide walks you through a clear and structured troubleshooting process. This is one of the most common issues in home labs and entry-level IT or cybersecurity environments.

Step 1: Verify VirtualBox Network Settings (Host Side)

Before troubleshooting inside Kali, confirm the VirtualBox configuration.

Power off the Kali Linux virtual machine.
Open VirtualBox Manager and select the Kali VM.
Go to Settings → Network.

Confirm the following:
• Adapter 1 is enabled
• Attached to is set to NAT (recommended for internet access)
• Adapter type is Intel PRO/1000 MT Desktop (82540EM)
• Promiscuous Mode is set to Deny
• Cable Connected is checked

Start the VM.

If Cable Connected is unchecked, Kali will not have network access.

Step 2: Confirm Kali Detects a Network Interface

Open a terminal in Kali and list interfaces:

ip a

You should see an interface such as eth0, enp0s3, or enp0s8.

If you only see lo (loopback), the network adapter is not properly attached in VirtualBox.

Step 3: Bring the Interface Up

If the interface exists but is down, manually bring it up:

sudo ip link set eth0 up

(Replace eth0 with your actual interface name.)

Verify the interface is now UP:

ip a

Step 4: Check for an IP Address (DHCP)

Check the interface details:

ip addr show eth0

Expected IP ranges:
• NAT mode: 10.0.2.x
• Bridged mode: 192.168.x.x

If no IP address is assigned, force DHCP:

sudo dhclient eth0

Recheck the interface:

ip a

Step 5: Restart NetworkManager

Kali uses NetworkManager for networking.

Restart it:

sudo systemctl restart NetworkManager

Check device status:

nmcli device status

The interface should show connected, not unmanaged or disconnected.

Step 6: Test Local Connectivity (Default Gateway)

Check the routing table:

ip route

You should see a default route similar to:

default via 10.0.2.2 dev eth0

Test the gateway:

ping -c 4 10.0.2.2

If this works, the VM’s internal networking is functional.
If it fails, the issue is likely VirtualBox adapter configuration.

Get Tony’s stories in your inbox

Join Medium for free to get updates from this writer.

Step 7: Test Internet Connectivity (Bypass DNS)

Ping a public IP address:

ping -c 4 8.8.8.8

If this works but domain names fail, the issue is DNS.
If it fails, the issue is routing or adapter configuration.

Step 8: Fix DNS Resolution

Check DNS configuration:

cat /etc/resolv.conf

If it is empty or incorrect, edit it:

sudo nano /etc/resolv.conf

Add the following entries:

nameserver 8.8.8.8
nameserver 1.1.1.1

Save the file and test DNS:

ping -c 4 google.com

Step 9: Try a Different VirtualBox Network Mode

If NAT does not work, try Bridged Adapter.

Bridged mode places Kali on the same network as the host and requires an active host connection.

Host-Only mode allows communication only between host and VM and does not provide internet unless a second adapter is configured.

Step 10: Check for Multiple Active Adapters

If multiple adapters are enabled:
• Adapter 1 should be NAT or Bridged
• Additional adapters should be disabled unless intentionally labbing

Multiple active adapters can break routing.

Step 11: Firewall Check (Rare)

List firewall rules:

sudo iptables -L

Temporarily flush rules for testing:

sudo iptables -F

Re-test connectivity.

Step 12: Verify Network Driver (Advanced)

Check for Ethernet hardware:

lspci | grep -i ethernet

Verify the e1000 module is loaded:

lsmod | grep e1000

If missing, load it:

sudo modprobe e1000

Step 13: Reinstall Network Stack (Last Resort)

Update packages:

sudo apt update

Reinstall NetworkManager:

sudo apt install — reinstall network-manager

Reboot the system.

Most Common Root Causes

• Cable Connected unchecked
• Interface down by default
• DHCP not assigning an IP
• DNS misconfiguration
• Incorrect VirtualBox adapter mode

Final Thoughts

Kali networking issues are almost always caused by VirtualBox configuration, not Kali itself. Following a structured troubleshooting approach like this mirrors real IT support and SOC workflows and is essential for anyone building a cybersecurity home lab.

--

--