VPN disconnects when the Mac sleeps
When the Mac sleeps, its network connection goes down, and most VPN tunnels go down with it. The VPN must then connect again after wake. This guide finds when the drops happen and which setting reconnects the VPN.
My Mac has this problem: VPN disconnects when the Mac sleeps. Read https://kilobat.app/guides/vpn-disconnects-after-sleep.md and work through it with me. Install the Kilobat CLI if it’s missing: brew install seifip/kilobat/kilobat. Run the guide’s Terminal and kilobat checks yourself and tell me what you find. List the steps only I can do. Ask before you change any setting.
Symptoms
- After you open the lid, the VPN shows as disconnected.
- The VPN stays connected in its app, but no traffic passes after wake.
- A download or SSH session over the VPN stops each time the Mac sleeps.
- Internal sites fail for a minute after wake, then work again.
Likely causes
- The network link goes down during sleep. The tunnel depends on the Wi-Fi or Ethernet connection. When the Mac joins the network again, the VPN must connect again.
- The VPN has no automatic reconnect. VPN On Demand and the reconnect options in VPN apps start the tunnel again. Without them, you connect by hand.
- VPN On Demand cannot ask for your password. Apple says that VPN On Demand needs authentication without user interaction, such as a certificate.
- Wi-Fi joins slowly after wake. The VPN cannot connect until the Mac has a working network. See Mac Wi-Fi disconnects after sleep.
- The server ends idle or old sessions. Some VPN servers close a session that was quiet for a long time. Ask your administrator about the timeout.
How to check
Show the most recent sleep and wake events with their times.
pmset -g log | grep -E ' (Sleep|Wake|DarkWake) ' | tail -20After the next wake, show the state of each VPN configuration.
scutil --nc listShow the network state. Make sure that Wi-Fi or Ethernet is reachable before the VPN tries to connect.
scutil --nwiCompare the wake times with the times when the VPN dropped.
How to fix it
In the VPN app, turn on its auto-connect or reconnect option. The name differs between vendors.
Update the VPN app to its latest version.
For a managed VPN, ask your administrator to turn on VPN On Demand in the profile.
VPN On Demand needs certificate or other non-interactive authentication. Ask for a certificate if you sign in with a password.
To keep the Mac awake during a long transfer, prevent sleep while the transfer runs. See caffeinate on Mac: keep awake from Terminal.
If Wi-Fi is slow to join after wake, fix that first. Then test the VPN again.
With Kilobat
Show if a VPN carries traffic now, and whether all traffic or only some uses it.
kilobat ipThe Kilobat app’s History lists when a VPN went on or off. Compare it with the sleep times from
pmset.Show drops and network changes that the app recorded.
kilobat outagesKeep the Mac awake while a command over the VPN runs, such as a copy.
kilobat awake -- rsync -a server:/data ./dataWith Kilobat Pro, the VPN kill switch blocks new connections while the VPN is down. Apps then do not open new connections on the open network before the VPN is back.
Questions
Does “Wake for network access” keep the VPN connected?
No. That setting lets the Mac wake for requests such as file sharing. It does not keep a VPN tunnel up. See Use Wake for network access on a Mac.
Does Always On VPN work on a Mac?
Apple’s VPN overview lists Always On VPN for iOS, iPadOS and visionOS. It does not list it for macOS.
Can a Mac keep the VPN up with the lid closed?
Only while the Mac stays awake. When it sleeps, the network goes down. See Keep a MacBook awake with the lid closed.
Sources
- Apple Platform Deployment: VPN overview for Apple devices
- Apple Support: If your Mac isn't connecting to the internet over Wi-Fi
- Apple Support: Share your Mac resources when it’s in sleep
- pmset(1) and scutil(8), man pages installed with macOS 27.2
Checked on 7 November 2026.