2

I use VirtualBox v5.1.2 - host is Windows 10, guest is Linux Debian (6.0.9). I want to very simple thing which actually doesn't work in my VB: I only want to connect from host to guest (where is running database server). At this moment I have mobile internet connection on host via USB modem but I don't need internet in guest at all (either connect to or from guest).

I tried to set on VM network setting: Adapter 1 - > Attached to: Host-only adapter.

In Preferences of VirtualBox: Network -> Host-only Networks:

Adapter tab ->IPv4 Address: 192.168.150.2, IPv4 Network Mask: 255.255.255.0

DHCP Server tab -> Server Address : 192.168.56.100, Server Mask: 255.255.255.0, Lower Address Bound: 192.168.56.101, Upper Address Bound: 192.168.56.254

After this setting, the result of guest ifconfig is: eth0 (...) inet addr: 192.168.56.101 but I can't connect 192.168.56.101 from host: neither ping nor accessing server from host to guest. Ping result in host is: Request timed out.

I was also trying some NAT settings, but also without success.

Firewall is disabled during connection testing.

What am I doing wrong?

1 Answer 1

5

Resolved :) Thanks to: https://serverfault.com/questions/131484/cant-access-virtualbox-host-only-network-from-windows-host

The problem was: adapter address was: 192.168.150.2, but addresses range from DHCP: 192.168.56.101 - 192.168.56.254, so they weren't able to see each other.

After setting adapter address to 192.168.56.99 I can connect to the guest service from host :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.