• Digital accessories
  • Server
  • Digital life
  • Privacy policy
  • Contact us
  1. Home
  2. Article
  3. Can't access VirtualBox host-only network from windows host ...

Can't access VirtualBox host-only network from windows host ...

Rsdaa 18/11/2021 1865

Stack Exchange Network

Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange0+0Log inSign up

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Sign up to join this community

Anybody can ask a question

The best answers are voted up and rise to the top

Asked11 years, 5 months ago

Viewed63k times

I've got two vms running on a windows host, each with a host-only network and ips in the 192.168.56.XXX range.One of them is running apache and serving some content that I want to access from my windows host.

However, the windows host can't access the apache server at all.The server is running on 192.168.56.103.ipconfig from windows says it's ip for the Virtual Box interface is 169.254.143.37.I tried route add to route 192.168.56.XX traffic, but everything I tried didn't work and I was probably using it wrong.

Any ideas on how to make this work?

asked Apr 12 '10 at 1:32

Markus Orreilly

Markus Orreilly

If you want to communicate with your VMs with 192.168.56.XXX IP, you need the host Virtual Box interface to have an IP on the same range. Your interface don't (169.254).

On a fresh installation of VBox 3.1.8, it creates a new interface named "VirtualBox Host-Only Network" with a static IP address of : 192.168.56.1/24.

Your interface is most probably misconfigured to use DHCP. Change it to use 192.168.56.1 with 255.255.255.0 netmask and it should work.

answered May 12 '10 at 7:34

2

I was able to fix this by giving my server a static address of 192.168.56.11. Then, I was able to ping my guest OS from the host. I also added a host file entry on my host machine to make it easier to access.

I'm still unable to ping the host from the guest... not sure why.

answered Jan 15 '11 at 14:54

Your VMs are getting IPs like 169.* because their DHCP clients are not finding a DHCP server to give them a lease.Therefore, the IP of the host & IPs of the VMs are not accessible to each other.A static route won't really solve this.You need to figure out why the VMs are not getting an IP lease, or you could try manually setting the IP addresses to the same private Class C (192.168.56.*) that your host is on.

answered May 31 '10 at 13:13

JayJay

10633 bronze badges

answered Apr 4 '13 at 17:38

1

Have you set the correct default gateway in your VM? What's the routing table look like on host and guest?

answered Apr 12 '10 at 8:36

Tom NewtonTom Newton

3,86122 gold badges2222 silver badges2828 bronze badges

Once you find, install and start the Host-only adapter on your Windows host, if you still can't connect to the VMs, try turning off the Windows firewall for that adapter.

If that works, you can either leave it that way, or use your Windows Firewall-fu to open the correct ports and stuff.

answered Jun 18 '10 at 12:30

169.254 = No DHCP server found. THis could be either there isnt one or there is a firewalling issue.Depending on your operating system it would also be advisable to check your firewall rules. Windows 7 is quite paranoid!

answered Jun 25 '10 at 11:14

JamesKJamesK

1,6561111 silver badges1919 bronze badges

If you can't ping host from VM, have you try to turn off firewall on host? perhaps it's filtering ICMP request. Turn off the firewall as test, if ping is OK then you should check your firewall configuration that filter ICMP request.

answered Jun 8 '12 at 19:03

I ran into this issue and it turned out that VBox simply wasn't able to obtain an IP for my Mac guest as it is not a member of our domain. I simply made sure that the host adapter and guest VM were set to the same subnet and then manually set the IP of the guest VM to match the network part of the adapter:

Windows (Host) Host-Only Network Adapter:- Subnet: 255.255.255.0- IPv4 Address: 192.168.56.1

Mac (Guest) VM Network Configuration:- Subnet: 255.255.255.0- IPv4 Address: 192.168.56.2

Voila! My "Self-assigned IP" warning went away and I could ping Host <=> Guest...

Hope this helps someone!

answered Jun 15 '17 at 17:08

derekmx271derekmx271

11111 silver badge66 bronze badges

If you are using Windows, go to Firewall Settings and allow all Virtual Box executables to pass thru. This one does the trick.

[root@classroom ansible]# ping 192.168.56.1PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.64 bytes from 192.168.56.1: icmp_seq=1 ttl=128 time=0.238 ms64 bytes from 192.168.56.1: icmp_seq=2 ttl=128 time=0.473 ms64 bytes from 192.168.56.1: icmp_seq=3 ttl=128 time=0.357 ms

answered Mar 12 '18 at 1:04

I had the same problem and I used a combination of the answer provided by Christophe Drevet-Droguet and the text quoted below (which i found at the following link: https://www.vmware.com/support/ws4/doc/network_configure_ws.html)

Although VMnet0, VMnet1 and VMnet8 are available in the network adapter list, they are normally used for bridged, host-only and NAT configurations, respectively.

I was using NAT in my guest VM's network settings and so i fixed the IP and subnet in the VMware Network Adapter VMnet8 properties on Windows 10. And then it worked.

answered Aug 29 '18 at 10:00

You can use NAT and setting port forwarding. in port forwarding, add new rule HTTP, TCP, 127.0.0.1, 8888, 192.168.56.103, 80

Run youn virtualbox than use your browser http://127.0.0.1:8888

answered Jan 1 '20 at 0:36

Go to File Menu in your virtual box and choose 'Host Network Manager', then check the radio button 'Configure Adapter Automatically'. Then try to ping from your windows host. This worked for me.

answered May 24 '20 at 5:19

Server Fault works best with JavaScript enabled

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.


PREV: Uninstall Plex Media Server | Plex Support

NEXT: Setting Up and Managing Plex Media Server on NVIDIA SHIELD ...

Popular Articles

Hot Articles
Back to Top