-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Issue: No Internet Access on Kali Linux VM When Both NAT and Host-Only Adapters Are Enabled in VirtualBox
Description
I am running Kali Linux in VirtualBox on a Windows host. I have configured two network adapters for the VM:
- Adapter 1 (NAT) — Enabled
- Adapter 2 (Host-Only Adapter) — Enabled
Observed Behavior:
- When only NAT is enabled, the VM has internet access, and
ip a(orifconfig) shows the correctinetIP address for the NAT adapter. - When both NAT and Host-Only adapters are enabled:
- Internet access is lost in the VM.
- The VM only displays the Host-Only adapter's IP (usually in the
192.168.56.0/24range). - The
inetIP for the NAT interface is not shown, and tools likeping,apt, orcurlfail due to lack of connectivity.
Steps to Reproduce
- Launch VirtualBox and open Settings for the Kali Linux VM.
- Under Network, enable two adapters:
- Adapter 1: Attached to NAT
- Adapter 2: Attached to Host-Only Adapter
- Start the VM and run
ip aorifconfig. - Attempt to access the internet using
ping google.comor similar commands.
Expected Behavior
- The VM should retain internet access through the NAT adapter, even when a Host-Only adapter is also enabled.
- Both adapters should have their own
inetIPs, and NAT should continue to provide a route to the internet.
Actual Behavior
- Only the Host-Only adapter's IP is active.
- Internet access is lost.
- The NAT adapter seems to be inactive or misconfigured when both adapters are enabled.
Environment
- Host OS: Windows 10 / 11
- Guest OS: Kali Linux (latest version)
- Guest Additions Installed: No
- Network Settings:
- Adapter 1: NAT
- Adapter 2: Host-Only Adapter
Additional Notes
- Once both the adapters are enabled, I can ping the host only adapter ip from my windows machine
- Disabling the Host-Only adapter restores internet access immediately.
- This may be a routing or priority issue with how VirtualBox sets up interfaces when multiple adapters are used.
Metadata
Metadata
Assignees
Labels
No labels