How to forward port 80 of Mac OS X to access web server on virtual machine

  • by

On UNIX based machines it is not possible to bind applications not running from root to any port below 1024. So the workaround is to to redirect port 80 to any other port say 8080 and then forward this port (8080) to port 80 of virtual machine using virtual machine settings. Now you will b able to access web server from your browser using the address localhost or

Here is how you can forward port 80 to port 8080 in Mac OS X

sudo ipfw add 100 fwd, 8080 tcp from any to any 80 in

Figure 1 shows port forwarding from host machine to guest machine in Virtual Box.

Figure 1

Leave a Reply

Your email address will not be published. Required fields are marked *