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
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"/>
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: 8080Code: 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]
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(1)
Code: Select all
debian:~# netstat -lntp
tcp6 0 0 :::22 :::* LISTEN 2381/sshd
tcp6 0 0 :::80 :::* LISTEN 2668/apapche2Code: 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 '^]'.http://forums.virtualbox.org/viewtopic. ... orward#top
Any hints is appreciated
Thank you