Home » Questions » Computers [ Ask a new question ]

How to make a port forward in Mac OS X

How to make a port forward in Mac OS X

I'd like to make all incoming connections to port 1000 of my host (IP: 200.234.XXX.XXX) to be forward to the port 80 on host 10.211.55.5

Asked by: Guest | Views: 303
Total answers/comments: 3
bert [Entry]

"Quite simple to do,
Firstly you will need to enable the remote login service on your mac (System Preferences -> Sharing -> Remote Login). This starts your ssh server.

Then run the following command in your OS X Terminal:

ssh -L 200.234.XXX.XXX:10000:10.211.55.5:80 -N 127.0.0.1

You may need to accept the server fingerprint initially as well as type in your local password for ssh login. (You can also set up a local to local ssh public / private key to make it not prompt for a password, will leave that as an exercise for the reader.)

The format is:

ssh -L local_addr:local_port:remote_addr:remote_port -N 127.0.0.1"
bert [Entry]

"Assuming you have a UPnP router, its easy to configure ports by using PortMap

It has a very simple UI."
bert [Entry]

"Here is a good article: http://www.cyberhq.nl/article/384/port-forwarding-in-macos-x

But since you are forwarding to 80 I'm assuming you want it to go to a web server so I would just change the web server config to set up a reverse proxy or something like that."
"Here is a good article: http://www.cyberhq.nl/article/384/port-forwarding-in-macos-x

But since you are forwarding to 80 I'm assuming you want it to go to a web server so I would just change the web server config to set up a reverse proxy or something like that."