Virtualbox - Configuring port forwarding with NAT

By xngo on June 23, 2019

VBoxManage modifyvm "next-64bit" --natpf1 "guestssh,tcp,127.0.0.1,8080,,80"

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. As a result, if you try to configure such a port forwarding, the VM will refuse to start.

Reference: http://www.virtualbox.org/manual/ch06.html#natforward

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.