Guide · 6 min read
Mac Screen Sharing is made for two Macs on the same network, so to use it over the internet you first put both on a VPN such as Tailscale, then connect to the other Mac's VPN address. Forwarding port 5900 on your router also works, but it leaves that Mac's login facing the whole internet.
Screen Sharing comes with every Mac, and at home it lists your other Mac by itself. From an office, a café or a hotel it lists nothing. This guide covers what makes it work from another network, what to set up before you leave, and where Wormhole fits. Each fact about macOS, Tailscale and port scanning comes from the page that owns it, listed under the post.
Does Mac Screen Sharing work over the internet?
Not on its own. Apple's page for when you can't share a Mac's screen says to make sure both computers are connected to the same network, and that neither Mac is asleep. So the job is to put the two Macs on one network again, and there are three ways to do it:
| Way | What it needs | Good for |
|---|---|---|
| A VPN such as Tailscale on both Macs | The VPN's app on each Mac, signed in to one account | Your own Macs, with nobody at the far one |
| Forwarding port 5900 on the router | Access to the router at the far end | Best avoided: the Mac's login faces the internet |
| An Apple Account request, or Messages | A person at the other Mac to say yes | Helping someone else |
How do I set up Screen Sharing over the internet with a VPN?
A VPN gives both Macs an address on one private network, wherever they are. The steps use Tailscale because its documentation covers each of them; another VPN that lets one Mac reach the other by address does the same job.
- Turn on Screen Sharing on the Mac you want to reach. Open System Settings, click General, then Sharing, and turn on Screen Sharing. Click the Info button beside it and choose who may connect under Allow access for; Only these users is the narrower choice. If Remote Management is on, turn it off first: Apple says the two cannot be on at the same time.
- Install Tailscale on both Macs and sign in to the same account on each. Its current client needs macOS Ventura 13.0 or later. Each Mac gets a name and an address that begins with 100, and the address stays the same when the Mac moves from one network to another.
- Look up the far Mac. The Machines page of Tailscale's admin console lists every device with its name and its address.
- Connect. On the Mac in front of you, open the Screen Sharing app, which is in Applications › Utilities. Click New Connection, enter that name or address, and click Connect. Give a user name and password for the far Mac if you are asked.
- Choose Standard if you are asked for a type. Standard adjusts resolution and frame rate to the network. High Performance asks for much more: Apple silicon and macOS Sonoma 14 or later on both Macs, UDP ports 5900, 5901 and 5902 open between them, and 75 megabits per second for a single 4K display, with a wired connection recommended.
Nothing is opened to the internet this way. Tailscale's documentation describes an encrypted, peer-to-peer connection between your devices.
What should I set up before I leave?
A Mac nobody is sitting at has three ways to drop out of reach:
- Sleep. Apple's checklist says neither Mac can be asleep. The settings that keep a desktop Mac awake are in the headless Mac mini guide.
- The VPN sign-in running out. By default Tailscale's device keys expire after 180 days, and then somebody has to sign in again at that Mac. Expiry can be turned off for one device on the Machines page (Disable Key Expiry); Tailscale warns that doing so reduces security.
- A restart. After a power cut or an update, a Mac waits at its login
window. Tailscale's comparison of its three Mac versions lists only the
open-source
tailscaledone as running before login, so with the usual app the Mac is off the VPN until someone logs in. Automatic login closes that gap, at a cost the headless guide goes through.
Can I forward port 5900 on my router instead?
It can be made to work, and it is the way to avoid. Apple's list of ports gives TCP 5900 to Screen Sharing and to VNC, the protocol it speaks, so forwarding that port to the Mac puts its Screen Sharing login in front of every address on the internet. A joint advisory that CISA published in December 2025 describes how attackers found industrial systems: they scanned the internet for VNC on port 5900 and the ports just above it, then tried weak and default passwords. A Mac with the port forwarded answers the same scan. With a VPN, the port stays closed to everyone outside your own network.
Can I connect with my Apple Account instead of an address?
The New Connection field takes an Apple Account as well as a hostname. Apple's guide says that between two Macs signed in to the same Apple Account the session starts, and that otherwise you sign in as a user of the other Mac or ask for permission to share its screen. Messages has the same request as Ask to Share Screen, and the session begins when the other person accepts.
Asking suits helping someone who is sitting at their Mac. For a Mac nobody is at, do not plan around it: the network step in Apple's own checklist is still that both computers are on the same network.
How does Wormhole work over the internet?
By the same route. Wormhole has no account and no relay server of its own, so away from home it reaches your other Mac over a network you run, such as the same Tailscale connection:
- On the Mac that shares, the menu bar panel lists the addresses it can be reached at, its Tailscale address among them.
- On the Mac you sit at, choose Pair a new Mac… and type that address under Add by address. The sharing Mac listens on TCP port 47473, so a firewall between the two has to allow it.
- Pair once. Both screens show the same six digits and someone confirms on each, so do it while you can still see both Macs.
- Pick a window and it opens here as a window of its own, or pick Whole screen. Every frame is end-to-end encrypted between your two Macs, whichever network carries it.
Add the Mac by its Tailscale address even if it was first found at home: a window you opened there then reconnects through that address when you carry the MacBook somewhere else. The setup guide has the first-run steps, and the free plan opens one remote window at a time (pricing).
What it does not do:
- It is Mac to Mac only, and needs the app on both Macs (macOS 14 Sonoma or later).
- It runs inside your account. Turn on Open at login in Settings › General so it starts when you log in; after a restart it is not there until someone does, and it cannot unlock a Mac whose screen is locked.
- While sharing is on, it keeps that Mac awake and its screen unlocked. That is what keeps the Mac reachable, and it also means anyone in the room with it can use it.
- It can wake a sleeping Mac on your local network only, not from another one.
- It has not been tested yet on a Mac mini with no display attached.
The last two are on the known issues page, with everything else that does not work yet.
When is another tool the better choice?
- You want the whole desktop now and then. Screen Sharing over the VPN is already on your Mac and needs nothing more.
- You are helping someone else. Ask to share their screen from Messages.
- You connect from an iPhone, an iPad or a Windows PC, or cannot run a VPN on one of the Macs. Wormhole cannot do that. Look for a remote desktop app that brings its own connection service; the other ways to reach a Mac are compared with their sources.
- You want one app from the far Mac beside your local windows. That is the case Wormhole is for, and how it differs from Screen Sharing has the detail.
Questions people ask
Which port does Mac Screen Sharing use?
TCP port 5900, in Apple's list of ports. High Performance also needs UDP ports 5900, 5901 and 5902 between the two Macs.
Do I need a static IP address?
Not with a VPN. You connect to the Mac's Tailscale name or address, and Tailscale says the address stays the same when a device changes networks. Only port forwarding depends on the public address of your home connection.
Does Wormhole need Screen Sharing turned on?
No. It is a separate app with its own pairing, its own connection and its own permissions, so Screen Sharing can stay off. For the steps on one network, see how to control your Mac mini from your MacBook.
Related
- Mac Screen Sharing High Performance mode: what it needs
- Can you drag a window between Macs with Universal Control?
- Mac Screen Sharing not working? What to check, in order
Sources
- Apple — If you can't share Mac computer screens (Mac User Guide)
- Apple — Turn Mac screen sharing on or off (Mac User Guide)
- Apple — Share the screen of another Mac (Mac User Guide)
- Apple — Screen sharing type options on Mac (Mac User Guide)
- Apple — TCP and UDP ports used by Apple software products
- Apple — Share your screen using Messages on Mac
- Tailscale Docs — Install Tailscale on macOS
- Tailscale Docs — Access NAS, media servers, or file shares remotely
- Tailscale Docs — How Tailscale assigns IP addresses
- Tailscale Docs — Connect to devices
- Tailscale Docs — Key expiry
- Tailscale Docs — Three ways to run Tailscale on macOS
- CISA — Cybersecurity Advisory AA25-343A, on attacks through internet-facing VNC