Permitted host ports for port forwarding
Posted: 17. Oct 2011, 05:19
Hi all. I'm using VirtualBox 4.1.2 on Ubuntu 10.04 LTS; I'm currently experimenting with VirtualBox, running a couple of VMs simultaneously in order to learn about virtual networking. I often use SSH to control my VMs.
When using port forwarding, it seems the only accepted value that it will accept for the host port is 2222 when port forwarding to the guest's port 22.
If I try assigning a different arbitary number (say, 2223) as a host port, then a port scan with nmap reveals that no such port has been opened.
I haven't seen any mention of this in the manual for VirtualBox and I'm at a bit of a loss to work out what's going on - all that I've read on the subject suggests that you can chose any port number, as long as it's above 1024, given that ports below 1024 require root privileges.
Basically, my idea was that I ought to be able to select which running VM to SSH into by using different ports. I've got a feeling that I've probably overlooked something obvious, but I can't think what. Any ideas?
Thanks for your help,
David
When using port forwarding, it seems the only accepted value that it will accept for the host port is 2222 when port forwarding to the guest's port 22.
If I try assigning a different arbitary number (say, 2223) as a host port, then a port scan with nmap reveals that no such port has been opened.
I haven't seen any mention of this in the manual for VirtualBox and I'm at a bit of a loss to work out what's going on - all that I've read on the subject suggests that you can chose any port number, as long as it's above 1024, given that ports below 1024 require root privileges.
Basically, my idea was that I ought to be able to select which running VM to SSH into by using different ports. I've got a feeling that I've probably overlooked something obvious, but I can't think what. Any ideas?
Thanks for your help,
David