Adding host-only network in addition to NAT

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Thorsten77
Posts: 6
Joined: 25. Jun 2013, 00:27

Adding host-only network in addition to NAT

Post by Thorsten77 »

My host is MacOS X and my VM is Windows 7. So far, I only used NAT, but I want to be able to communicate from guest to host and vice versa. Inmy understanding, I need to add a second network adapter of type host-only, similar to this (viewtopic.php?f=8&t=34396) article.

I did this and its available in MacOS (ifconfig):

Code: Select all

vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 0a:00:27:00:00:00 
	inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255
Also, I can see both network adapters in Windows 7 (ipconfig):

Code: Select all

Ethernet adapter Local Area Connection 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter #2
   Physical Address. . . . . . . . . : 08-00-27-2F-93-A2
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.56.2(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter
   Physical Address. . . . . . . . . : 08-00-27-40-CB-CC
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::3d8a:ac1e:d6b5:401d%10(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.2.15(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, October 16, 2013 5:32:45 PM
   Lease Expires . . . . . . . . . . : Thursday, October 17, 2013 5:32:46 PM
   Default Gateway . . . . . . . . . : 10.0.2.2
   DHCP Server . . . . . . . . . . . : 10.0.2.2
   DHCPv6 IAID . . . . . . . . . . . : 235405351
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-3D-55-AA-08-00-27-40-CB-CC

   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Basically, as far as I understand, I created a network with IPs ranging from 192.168.56.1 to 192.168.56.254, where 192.168.56.1 is our MacOS host and 192.168.56.2 is our Windows VM. From the VM, I can ping both IP adresses sucessfully. However, from the host I can only ping 192.168.56.1 (the host itself); pinging 192.168.56.2 results in timeouts. I disabled the Windows firewall, but it still doesn't accept pings. FWIW, the network sharing center shows 2 networks, first one for the NAT and the second one for the host-only network, but it is labeled as "Unidentified network" and of type "Public network" - not sure if this might be an issue.

Has anyone an idea of what part of the configuration is wrong here?
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Adding host-only network in addition to NAT

Post by noteirak »

If all network traffic works except from host to VM, it would be a firewall issue, or some other software blocking the traffic, or a missconfigured network in either the host or the guest.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply