port forwarding partial success
Posted: 25. Nov 2009, 04:39
I followed the example in the user guide for forwarding 2222 on the host to 22 on a guest, and I can now ssh to the guest just fine. I'm not able to get other ports forwarding properly, though:
new-host-2:centos dan$ VBoxManage getextradata centos enumerate | grep guesthttp
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort, Value: 80
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort, Value: 8080
I have apache running in the guest on 80, and it's definitely running/listening - I can telnet to 80 from inside the guest, and I can verify that it's listening via netstat, lsof, etc. I've restarted the VM (i.e., all VirtualBox apps on the host) a couple of times, but that doesn't appear to change anything.
Oddly, the VirtualBox apps do appear to be listening on 8080 on the host:
new-host-2:centos dan$ lsof -P | grep Virtual | grep LISTEN | grep 8080
VirtualBo 73773 dan 39u IPv4 0x8a9a66c 0t0 TCP *:8080 (LISTEN)
But when I connect to them and try to push some data across, I get nothing back. tcpdump shows the data being consumed by the VirtualBox process, but nothing makes it through to the guest.
I've tried this with other ports and simple netcats on the guest/host, but I get the same results that I get with the apache setup described above.
The host is running VirtualBox 3.0.12, Mac OS X 10.5.8, and the guest is CentOS 5.4.
Any ideas what I'm doing wrong?
TIA,
Dan
new-host-2:centos dan$ VBoxManage getextradata centos enumerate | grep guesthttp
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/Protocol, Value: TCP
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/GuestPort, Value: 80
Key: VBoxInternal/Devices/pcnet/0/LUN#0/Config/guesthttp/HostPort, Value: 8080
I have apache running in the guest on 80, and it's definitely running/listening - I can telnet to 80 from inside the guest, and I can verify that it's listening via netstat, lsof, etc. I've restarted the VM (i.e., all VirtualBox apps on the host) a couple of times, but that doesn't appear to change anything.
Oddly, the VirtualBox apps do appear to be listening on 8080 on the host:
new-host-2:centos dan$ lsof -P | grep Virtual | grep LISTEN | grep 8080
VirtualBo 73773 dan 39u IPv4 0x8a9a66c 0t0 TCP *:8080 (LISTEN)
But when I connect to them and try to push some data across, I get nothing back. tcpdump shows the data being consumed by the VirtualBox process, but nothing makes it through to the guest.
I've tried this with other ports and simple netcats on the guest/host, but I get the same results that I get with the apache setup described above.
The host is running VirtualBox 3.0.12, Mac OS X 10.5.8, and the guest is CentOS 5.4.
Any ideas what I'm doing wrong?
TIA,
Dan