Port Forwarding Problems

Discussions related to using VirtualBox on Windows hosts.
mav
Posts: 3
Joined: 27. Apr 2009, 14:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: gentoo

Re: Port Forwarding Problems

Post by mav »

This may be a bit of a grave dig on these forums, but did you work out why apache didn't work simple112?

I am having the same problem ssh works no problems, apache works on my guest but i can't reach it from the host. No firewall setup on host

Code: Select all

Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/InfoDlgState, Value: 400,450,normal
Key: GUI/LastWindowPostion, Value: 61,120,720,442
Key: GUI/Fullscreen, Value: off
Key: GUI/Seamless, Value: off
Key: GUI/AutoresizeGuest, Value: on
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort, Value: 2222
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort, Value: 22
Key: GUI/LastCloseAction, Value: powerOff
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort, Value: 8080
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort, Value: 80
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol, Value: TCP
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Port Forwarding Problems

Post by TerryE »

You are trying to connect to http://host:8080/whateverTheSiteLinkIs aren't you?
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
mav
Posts: 3
Joined: 27. Apr 2009, 14:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: gentoo

Re: Port Forwarding Problems

Post by mav »

TerryE wrote:You are trying to connect to http://host:8080/whateverTheSiteLinkIs aren't you?
Yes same way i have been connecting through with ssh,

I have played around with it some more and now get HTTP 300 invalid request response but it doesn't identify it as the web-server that is giving me the response, i'm starting to wonder wether that response is coming from virtualbox the host or the guest.

Googling suggests stuff with iptables needs to be done but this is when you have a linux host and linux guest and forcing it to NAT.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Port Forwarding Problems

Post by TerryE »

You need to be a little careful -- especially if you are using virtual hosts in apache. If you think about it, this facility enables many websites to be mapped to the same IP address, and the way that apache decides which virtual host (in an http.conf sense) to use is by interrogating the request header to discover what the client is using for its host. Port redirection will get this hopelessly confused. I must admit that since version 2, using the bridged interface is just so easy that I've stopped using NAT.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
mav
Posts: 3
Joined: 27. Apr 2009, 14:41
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: gentoo

Re: Port Forwarding Problems

Post by mav »

TerryE wrote:You need to be a little careful -- especially if you are using virtual hosts in apache. If you think about it, this facility enables many websites to be mapped to the same IP address, and the way that apache decides which virtual host (in an http.conf sense) to use is by interrogating the request header to discover what the client is using for its host. Port redirection will get this hopelessly confused. I must admit that since version 2, using the bridged interface is just so easy that I've stopped using NAT.
Yes but i've read there is difficulty when the host is using a wireless card like i am for my network i believe it has problems i have yet to try it yet.
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: Port Forwarding Problems

Post by Sasquatch »

Those issues were only when a virtual interface were used and you had to bridge it manually. Now VB accesses the NIC directly. That doesn't give those issues.
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