Permitted host ports for port forwarding

This is for discussing general topics about how to use VirtualBox.
Post Reply
dgh82
Posts: 2
Joined: 17. Oct 2011, 05:05
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Arch Linux, Debian

Permitted host ports for port forwarding

Post by dgh82 »

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
dgh82
Posts: 2
Joined: 17. Oct 2011, 05:05
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Arch Linux, Debian

Re: Permitted host ports for port forwarding

Post by dgh82 »

Oops - apologies, it is working. The problem was with nmap. Briefly, I'd assumed that nmap scanned every available port with the settings I was using, however it turns out that it was only scanning certain typical ports which it would expect are highly likely to be in use.
Post Reply