Network Problem

Discussions related to using VirtualBox on Linux hosts.
Post Reply
thumper78
Posts: 7
Joined: 15. Sep 2021, 01:11

Network Problem

Post by thumper78 »

Hello All,
I'm having a real problem with my VMs not being able to ping the host (Kali-Lenix). But the host can ping the two VM and they can ping each other. Both VMs are Linux based. This is using the host-only network setting. According to the documentation, in host-only mode the host and the VM should be able to communicate with each other, but the VMs can't reach the net. Why are the two VMs not able to ping the host?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Network Problem

Post by scottgus1 »

thumper78 wrote:the host can ping the two VM and they can ping each other.
This means that Host-Only is working. Ping either way on a network confirms the integrity of the basic network.
thumper78 wrote:my VMs not being able to ping the host (Kali-Lenix)
Does the host's firewall block ping?
thumper78 wrote:the VMs can't reach the net.
Host-Only is between the attached VMs and ... wait for it.. the host only. :lol: See Virtualbox Networks: In Pictures

For internet access, NAT, NAT Network, or Bridged are needed. For LAN access as well, only Bridged will work easily. (NAT/NAT Network can access he LAN, but only via IP address.)
thumper78
Posts: 7
Joined: 15. Sep 2021, 01:11

Re: Network Problem

Post by thumper78 »

Thanks for the reply. I guess I wasn't very clear with my post. I understand the VMs can't access the net with the host-only adapter. No problem, that's good. The problem is that the VMs can't communicate (ping) with the host, but the host can communicate (ping) them. According to the docs the VMs should be able ping the host. I shut down the firewall on the host and still the same problem. Is it the VMs or the Kali or VirtualBox causing the problem?
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Network Problem

Post by Martin »

Which address did you try to ping from the guests?
The main IP address of the host will not be reachable over the host only adapter.
The guests can only reach the host using the IP address of the host only adapter.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Network Problem

Post by scottgus1 »

Note Martin's thoughts above, and please provide this data:

on the host:

vboxmanage list hostonlyifs

on host and both VMs:

ip address

Also, please zip and post each VM's .vbox file, using the forum's Upload Attachment tab.
thumper78
Posts: 7
Joined: 15. Sep 2021, 01:11

Re: Network Problem

Post by thumper78 »

OK, problem solved. I was trying to use the main IP of the host. I did an nmap from one of the VM and got the hosts "host-only" IP. That worked. Thanks to Martin for the heads up!!
Post Reply