Host cannot access web server on guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
fatllama
Posts: 1
Joined: 25. Sep 2009, 08:55
Primary OS: MS Windows Vista
VBox Version: OSE Fedora
Guest OSses: Fedora FC11

Host cannot access web server on guest

Post by fatllama »

Hi, can anyone help me to work this out.

I am tryng to experiment with a JBoss portal running on a virtual machine. My setup is as follows:
1 x Vista Host
2 x FC11 guests

All machines are up and running. I have VBox additions installed, and am successfully using shared folders between host and guest.
Each machine can access the internet, the host obviously going direct, each guest uses a NAT network card. This is all tested and working
For virtual machine networking I have used a VBox Host Only network, and I have confirmed that I can ping each machine from every other machine.
  • Host = 192.168.56.1
  • Guest 1 = 192.168.56.2
  • Guest 2 = 192.168.56.3 (this is the JBoss portal web server)
The JBoss portal web server is accessible, as standard for JBoss, at the following URL: http://192.168.56.3:8080/portal.[b] I can access this URL from both virtual machines, but cannot access it from the host.[/b]

I have tried switching off guest and host firewalls, but to no effect. I have also tried telnet to 192.168.56.3:8080 from the host and this seems to work (screen goes blank, flashing cursor) - so I think the network configuration is fine.

I guessed that the problem is something to do with IE trying to access the URL via a physical card on the host, rather than using the VBox Host Only network. So I added a static route:
route add -p 192.168.56.0 mask 255.255.255.0 192.168.56.1 metric 276 if 26
... where I used the same metric as seemed to be assigned to the VBox Host Only network, and if=26 was confirmed using route print. Following this command, my Visa route print output is as follows
===========================================================================
Interface List
19 ...00 f1 d0 00 f1 d0 ...... GlobeTrotter HSxPA - Network Interface
17 ...00 1f 3a d7 1e 05 ...... Bluetooth Device (Personal Area Network) #2
12 ...00 1f 3b 98 57 67 ...... Intel(R) Wireless WiFi Link 4965AGN
11 ...00 1d 09 58 c8 1d ...... Marvell Yukon 88E8040 PCI-E Fast Ethernet Controller
26 ...08 00 27 00 f8 17 ...... VirtualBox Host-Only Ethernet Adapter
1 ............................. Software Loopback Interface 1
10 ...02 00 54 55 4e 01 ...... Teredo Tunneling Pseudo-Interface
32 ...00 00 00 00 00 00 00 e0 isatap.{DA1D54B2-2545-4BD9-872E-B15F111D83EA}
31 ...00 00 00 00 00 00 00 e0 isatap.{E766D456-B061-4D27-AF55-6BC65EE794E5}
16 ...00 00 00 00 00 00 00 e0 isatap.{BA78E114-2B0C-4901-A9B3-3D34F265955A}
37 ...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
36 ...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
29 ...00 00 00 00 00 00 00 e0 isatap.{C074BEFF-E836-4BBD-AE06-D0A2C01A714E}
30 ...00 00 00 00 00 00 00 e0 isatap.{C074BEFF-E836-4BBD-AE06-D0A2C01A714E}
33 ...00 00 00 00 00 00 00 e0 isatap.{839D3BA5-A1C6-4DAB-897A-6D49EED83B72}
43 ...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #9
44 ...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 On-link 192.168.56.1 276
0.0.0.0 0.0.0.0 89.195.66.34 89.195.66.32 40
89.195.66.0 255.255.255.0 On-link 89.195.66.32 296
89.195.66.32 255.255.255.255 On-link 89.195.66.32 296
89.195.66.255 255.255.255.255 On-link 89.195.66.32 296
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.56.0 255.255.255.0 192.168.56.1 192.168.56.1 296
192.168.56.1 255.255.255.255 On-link 192.168.56.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.56.1 276
224.0.0.0 240.0.0.0 On-link 89.195.66.32 296
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.56.1 276
255.255.255.255 255.255.255.255 On-link 89.195.66.32 296
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
192.168.56.0 255.255.255.0 192.168.56.1 276
0.0.0.0 0.0.0.0 192.168.56.1 Default
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
44 1140 ::/0 2002:c058:6301::c058:6301
1 306 ::1/128 On-link
44 1040 2002::/16 On-link
44 296 2002:59c3:4220::59c3:4220/128
On-link
1 306 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
The static route can definitely be seen, but still I get "The Web Page cannot be displayed". Can someone help - is there something I need to do to get the host to access the guest web server. I have seen some posts that discuss using port forwarding on the host, so that typing http://localhost:8080 would forward the request to the guest OS. But that's not what I want to achieve. The host has full access as far as I can tell to the VBox Host only network - so why can it not load the web page?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Host cannot access web server on guest

Post by vbox4me2 »

What does a tracert say? it might be that the Guests have no route back to the Host.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Host cannot access web server on guest

Post by Sasquatch »

A direct connection such as the Host-Only one does not need a gateway or anything like that. The OSses already know how to access the rest of the IP range, because the NIC already has a configuration for that network.
You need to test the connection itself. Can the Host ping the Guests and vice versa? Can other traffic go back and forth?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply