port forward fail(host windows xp , guest debian )

Discussions related to using VirtualBox on Windows hosts.
Post Reply
cybersoso
Posts: 3
Joined: 29. Dec 2008, 02:51

port forward fail(host windows xp , guest debian )

Post by cybersoso »

I am using vitualbox2.1.0
My host is windows xp, guest is debian
vitualbox uses NAT

I want to set port forward(but failed):
  • Host:8080--->Guest:80
    Host:22888--->Guest:22
This is my setting:
1.On host :
(1)I can see this in file C:\Documents and Settings\Administrator\.VirtualBox\Machines\debian\debian.xml

Code: Select all

      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" value="TCP"/>
      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" value="22"/>
      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" value="22888"/>
      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol" value="TCP"/>
      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort" value="80"/>
      <ExtraDataItem name="VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort" value="8080"/> 
(2)

Code: Select all

D:\Program Files\VirtualBox>VBoxManage.exe getextradata debian enumerate
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Key: GUI/SaveMountedAtRuntime, Value: yes
Key: GUI/LastWindowPostion, Value: 60,34,720,440
Key: GUI/Fullscreen, Value: off
Key: GUI/Seamless, Value: off
Key: GUI/AutoresizeGuest, Value: on
Key: GUI/InfoDlgState, Value: 400,450,normal
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort, Value: 22
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort, Value: 22888
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort, Value: 80
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort, Value: 8080
(3)

Code: Select all

D:\Program Files\VirtualBox>netstat /anb
TCP   0.0.0.0:8080   0.0.0.0:0     LISTENING   1132  [VirtualBox.exe]
TCP   0.0.0.0:22888  0.0.0.0:0     LISTENING   1132  [VirtualBox.exe]
(4)

Code: Select all

D:\Program Files\VirtualBox>telnet 127.0.0.1  8080
Connecting To localhost...Could not open connection to the host, on port 8080: Connect failed

D:\Program Files\VirtualBox>telnet 127.0.0.1  22888
Connecting To localhost...Could not open connection to the host, on port 22888: Connect failed
2.On guest
(1)

Code: Select all

debian:~# netstat -lntp
tcp6       0      0 :::22                :::*                    LISTEN     2381/sshd  
tcp6       0      0 :::80                :::*                    LISTEN     2668/apapche2
(2)

Code: Select all

debian:~# telnet 127.0.0.1 22
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.3p2 Debian-9
quit
Protocol mismatch.
Connection closed by foreign host.

debian:~# telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
I have read this topic but cannot find solution for my problem
http://forums.virtualbox.org/viewtopic. ... orward#top

Any hints is appreciated
Thank you
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:

Post by TerryE »

See Ticket #2808. The work-around is to downgrade to 2.0.6 until 2.1.0 is out.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
tobiasly
Posts: 2
Joined: 9. Jan 2009, 17:46

Post by tobiasly »

TerryE wrote:See Ticket #2808. The work-around is to downgrade to 2.0.6 until 2.1.0 is out.
FYI, this problem still exists in 2.1.0 (as described in the ticket, it was fixed on trunk while 2.1.0 was out) and so 2.0.6 must still be used until the next version. I was using 2.1.0 and had this same problem.

I'm rather surprised that Sun doesn't have a test harness to catch something as integral as port forwarding!
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:

Post by TerryE »

Sorry for my typo. Since we were discussing a bug in 2.1.0, I hope you realised that I meant until 2.1.2.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
tobiasly
Posts: 2
Joined: 9. Jan 2009, 17:46

Post by tobiasly »

TerryE wrote:Sorry for my typo. Since we were discussing a bug in 2.1.0, I hope you realised that I meant until 2.1.2.
Thanks Terry, I realized what you meant but my comment was more for others who read the topic just to avoid possible confusion.
Post Reply