VirtualBox NAT port forwarding configuration (<1024)

1

1

I'd like to forward requests from 127.0.0.1:80 to a guest OS in VirtualBox VM (CentOS 7) - 10.0.2.15:8080. Is that possible?

If I forward 127.0.0.1:9090 everything works fine, but as soon as I forward 127.0.0.1:80 things stop working. Is there a way to use ports <1024 for NAT port forwarding configuration?

My host OS is Mac OS X.

markovuksanovic

Posted 2014-09-03T13:42:14.543

Reputation: 179

1Maybe related that on many systems only root can do port bindings with port <1024. Not sure if related in this case. – frlan – 2014-09-03T13:47:52.850

Yeah probably. But id like to know if there is a way to achieve this. – markovuksanovic – 2014-09-03T13:49:29.837

Related question on StackOverflow. I personally like the idea of using iptables if you have access to that, otherwise using nginx or apache to proxy the requests is a viable option as well. – heavyd – 2014-09-03T14:14:52.893

Answers

0

Port 80 will already be used by the native OS/x so you'll need to ensure this is disabled (Web sharing in control panel if memory serves). Then you'll probably need to do something along the lines of enabling access to this port in the firewall configuration.

robert

Posted 2014-09-03T13:42:14.543

Reputation: 196