Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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