The manual says: "Forwarding host ports < 1024 impossible: On Unix-based hosts (e.g. Linux, Solaris, Mac OS X) it is not possible to bind to ports below 1024 from applications that are not run by root".

Is it possible to disable this limitation? I run main internet services (such as mail server, for example (SMTP, IMAP, LDAP, HTTP, HTTPS), as VBoxHeadless machines and capture host's ports by VBoxManage modifyvm --natpf1). The only solution I can see now is capturing a higher port and redirecting traffic meant for a lower port by means of iptables or redir. But maybe there is more natural solution?

link|improve this question

38% accept rate
feedback

2 Answers

As clarified in the VirtualBox documentation, that is a well known limitation of the NAT mode. You could do two different things.

  1. Forward ports through NAT

    VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,80000,,80"

  2. Switch to the "Bridged Networking" mode

Reading from the documentation:

This is for more advanced networking needs such as network simulations and running servers in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.

link|improve this answer
I know of 2., but I prefer using things which I know how do they work and kip it simple. So, now I use 1. with redir to redirect host's 80 port to host's 80000 powrt, which is then captured by VirtualBox and taken to VM's 80. – Ivan Jul 21 '10 at 8:10
feedback

Yes, but what happend when you have a web server with https working in the virtual machine? An external browser can't access the 443 port and the connection is denied because in virtualbox you can't map the real 443 port to the 443 virtualized port. Any ideas?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.