Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GuillaumeB

macrumors 6502
Original poster
Jul 4, 2007
480
30
Just behind you
Hello,

I recently set up my former MacBook Pro as a server, making use of Back to my Mac, Resilio Sync, Plex and SMB/VNC to access it on the local network and outside. I'm happy it works great but I have one question.

I got three Mac on the same network. They all have the same public IP address so how is it that when I do:

smb://the-public-IP-address
or
vnc://the-public-IP-address

Why i'm establishing a direct connection with the server (referred to as BelfioreHub below) and not with one of the other Mac (GeeBook for instance)?

If I take VNC, for example, I did open and associated port 5900 to my server in my router but I also opened port 5901 and associated it with another Mac. Yet :

vnc://the-public-IP-address:5901 fails to work properly (I can't log in that other Mac)

Could the Plex server have done something special that associate this IP address to that particular machine? Here is what I did in my router:
4oYKRE8.png


i'm asking because I might at some point either buy a Mac Mini or build myself a hackintosh server.. So i'm wondering whether that's gonna work properly or if I need to properly set up my router

Thank you
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
I know zero about macOS Server, but it's likely that uPnP is doing an automatic port forward on the router for you, on behalf of the software.

Many devices and software do this, such as backup software or Xbox Live.
 

t0pher

macrumors regular
Sep 6, 2008
134
228
UK
I know zero about macOS Server, but it's likely that uPnP is doing an automatic port forward on the router for you, on behalf of the software.

Many devices and software do this, such as backup software or Xbox Live.

Check the security settings in system preferences of each Mac.

The inbound connectivity from across the net to the same public address works because the port is unique and gets forwarded by the router, likely using upnp, to the correct internal host.

You can manually configure port forwarding on your router or use your AirPort Extreme as the router and configure it there.

The thing to remember is that network routing in this case uses the combination of destination IP address and port number as a unique combination to match connections and route to the appropriate internal host. Change the port and you can reach a service (vnc, plex etc) on a different internal host.
 

kiwipeso1

Suspended
Sep 17, 2001
646
168
Wellington, New Zealand
Hello,

I recently set up my former MacBook Pro as a server, making use of Back to my Mac, Resilio Sync, Plex and SMB/VNC to access it on the local network and outside. I'm happy it works great but I have one question.

I got three Mac on the same network. They all have the same public IP address so how is it that when I do:

smb://the-public-IP-address
or
vnc://the-public-IP-address

Why i'm establishing a direct connection with the server (referred to as BelfioreHub below) and not with one of the other Mac (GeeBook for instance)?

If I take VNC, for example, I did open and associated port 5900 to my server in my router but I also opened port 5901 and associated it with another Mac. Yet :

vnc://the-public-IP-address:5901 fails to work properly (I can't log in that other Mac)

Could the Plex server have done something special that associate this IP address to that particular machine? Here is what I did in my router:
4oYKRE8.png


i'm asking because I might at some point either buy a Mac Mini or build myself a hackintosh server.. So i'm wondering whether that's gonna work properly or if I need to properly set up my router

Thank you

Plex runs as a server on the machine it is running on. You will just get it on that machine, or if you have a pass, from the cloud.

Easiest way to do this group of services is to hook up a mac mini to a HDTV and just leave it running plex and MacOS server. Main reason is to use a VPN direct to your MacOS Server from outside your network for VNC security.
 

DJLC

macrumors 6502a
Jul 17, 2005
959
404
North Carolina
So — the Mac you're trying to connect to using VNC on port 5901. Did you set the VNC server on that Mac to listen on 5901? If not, that's your issue — the connection is coming in from outside on 5901 and being forwarded to that Mac on 5901 per the forwarding rules you posted.

So to resolve: change your port forwarding rule. 5901 external to 5900 internal. That'll mean the connection comes in from outside on port 5901 and gets forwarded to that Mac on 5900.
 

kiwipeso1

Suspended
Sep 17, 2001
646
168
Wellington, New Zealand
You need to set it correctly in the router to pass through calls to ports to the machines that use them.
5900 needs to go to hub, 5901 to geebook, 5902 to lulumba.
To do that, you will need to setup fixed ip addresses reserved for those machines in your network router.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.