Unable to connect to VM from localhost via bridged connectio

Discussions related to using VirtualBox on Windows hosts.
Post Reply
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Unable to connect to VM from localhost via bridged connectio

Post by sandro »

Hi,

I just installed an Ubuntu guest on a Win7 host and configured a bridged connection which appears to work. I can ping from the guest and from the host and I can connect from other machines to the guest.

However a TCP connection (ping works as mentioned) directly from the host to the guest returns an error.

Would anyone know if I missed a configuration?
Thanks.
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

sandro wrote:However a TCP connection (ping works as mentioned) directly from the host to the guest returns an error.
if the ping works, everything is good on the side of Virtualbox. Nothing we can do here.

Some questions you should ask yousefl : What error? Is the port open in the guest OS? How do you try to connect via TCP (Application, telnet)? What is the status of the firewall?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Re: Unable to connect to VM from localhost via bridged conne

Post by sandro »

The host's firewall (Windows firewall) is disabled.

TCP connections generally dont seem to work FROM the host TO the guest (be it telnet, browser, .....) but they DO work FROM OTHER machines on the network TO the guest.
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

Then the issue is on the host, and you should look into that.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Re: Unable to connect to VM from localhost via bridged conne

Post by sandro »

I wouldnt rule that out but I wouldnt know where to start.

As I said, Windows' firewall is disabled, there are no others and network connections in general work fine.
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

Could you give a step-by-step with the exact commands and addresses you use from your host and from other machines to the guest?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Re: Unable to connect to VM from localhost via bridged conne

Post by sandro »

I have a bridged connection, so I have a LAN valid IP.

Pinging it works from the host as well as from other machines. Only using the same IP to connect via TCP (in this case HTTP to a webserver) only works from other machines. The host gives me using telnet a "connection failed" (which I assume would be a connection refused).

If there was a firewall I'd understand it but Windows' firewall is disabled (I triple checked it) and there is no other. On the guest side, "iptables --list" also returns an empty list.
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

Please read my post again - cannot help you like this
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Re: Unable to connect to VM from localhost via bridged conne

Post by sandro »

I am not quite sure what commands you refer to.
As I said, I tried to connect to port 80 via telnet (telnet [address] 80) and via a browser. The address was always the same one, the one LAN-valid assigned to the bridged adapter via DHCP.

If this is not the information you were asking for please let me know.

However, I managed to fix it for the time being by switching to vmware, where it worked straight out-of-the-box.
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

What I was asking was also the IP addresses you were using.
But if you're happy with VMware, that's fine.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
sandro
Posts: 6
Joined: 5. Feb 2013, 13:08

Re: Unable to connect to VM from localhost via bridged conne

Post by sandro »

It is 192.168.0.31. What would you reckon?
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: Unable to connect to VM from localhost via bridged conne

Post by noteirak »

Let's stop this madness for a second.
IF you still have your Virtualbox machine, run the following commands on the host and on the guest, and post back the results as attachement of a zip file.

On the host :
ipconfig /all
netstat -abn

On the guest :
ifconfig
netstat -lnp
iptables -nv -L
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply