Mac – VPN with mac mini reachable locally but not from the Internet

mac-miniNetworksshvpn

I have a Mac mini that I'm trying to make ssh-reachable when I'm in a coffeeshop outside on the Internet (How do I convert my mac mini into a remote server?) so I can run more computationally intensive tasks on it remotely. I've set up a VPN using Strongswan and this tutorial: (configure Strongswan on Ubuntu) and can now connect to it from my other computer on my home network. However, I can’t reach it from Internet with IPsec or ssh connection.

What am I missing? How do I fix it?

Best Answer

I will assume that your situation is like mine and most other at home: Your Mac mini and other computer is on a local network, you have a router and is connected to the internet using a service provider. Then there are four things needed to reach you mini from the internet.

1) The mac mini has to be "opened" for access. It seems you have done this already.

2) The internet provider needs to allow access from the internet to your computer. Some do, absolutely not all. And not necessarily on all ports. Some allow web on port 80 and 8080, some allow ssh. You need to check.

3) You need to find out the IP adress to your home network, actually to your router. Logging in to the router might give you that. One problem is that it can change, the IP adress lease is time limited. Some service providers can give you a static IP adress, often at a cost. If not, you could use a dynamic DNS adress service.

4) Finally, your router needs to take internet connections and transfer them to your Mac mini. You need to log in to the router and set up things there.

And lastly, remember to add security. It will take a few minutes before the crooks out there try to connect and make nasty things.