Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a setup of two Mac Mini, connected to a router with static IP.

Mac Mini 1 (Local IP: Mac Mini 2 (Local IP:

I use the built-in screen sharing for Mac OS X.

When I connect thru WAN, I want to be able to reach both of the computers. Like if my ip was:, and I can route: /

Is that possible?

share|improve this question
up vote 2 down vote accepted

Yes it is possible.

You need to set up port forwarding in your Router.

Depending on your Router's make/model, the setup may vary, but the basics are the same regardless.

I would choose a port way north of 1 or 2.

Both computers will be listening on port 5900, so you'd set something up like: -->

and -->
share|improve this answer
Ok. Sounds logical! So I can port forward (eg. to local IP and simply type in from another computer (and netword) to get it work? – Centrum Steve Jun 21 '12 at 13:03
@Mark That is correct. Don't forget to add the :5900 to the local IP. Also, it occurs to me, if you're trying to connect to your minis from another of your macs, you can use the "back to my mac" service with no router configuration, as long as you are logged into the same Apple ID on each one. – JoshP Jun 21 '12 at 13:05
Awesome! Didn't know about the Apple ID "back to my mac". I'm gonna google that now :) – Centrum Steve Jun 21 '12 at 13:08
Is there documentation anywere that says indicates osx uses port 5900 for "Back to My Mac"? – CharlesHolbrow Apr 30 '14 at 0:55
@CharlesHolbrow, Back to My Mac does not use port 5900. It's actually a service that runs on port 443 (https). Check out this Apple support document – JoshP Apr 30 '14 at 12:10

You cannot reach both computers on the same port but you can configure the router to pass different ports to different computers.

So for web usually on port 80 you can put on machine's server on that and the other on say port 81 or you can set the router o pass port 80 to port 80 on the first and port 81 to port 80 on the second.

share|improve this answer

Have you enabled the 'back to my mac' feature in the iCloud settings? That probably will work without adjusting your router settings.

Otherwise try searching for a UPnP setting in your routers setting and make sure it is turned on.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .