Resources

How to Resolve VPN Latency Issues for Remote Developers on Mac and Windows

How to Resolve VPN Latency Issues for Remote Developers on Mac and Windows

To resolve VPN latency for remote developers, first prove the VPN is the cause by running the same tests with the VPN off, on the default gateway and on the nearest approved gateway. Then work through the usual suspects in order: MTU size, DNS resolver order, protocol choice, gateway load and split tunneling, using the built-in tools on macOS and Windows. In most cases the codebase is not at fault. The delay comes from routing, DNS behavior, packet size, the VPN protocol, an overloaded gateway, or the way each operating system treats network adapters.

For developers this is more than an annoyance. A slow tunnel makes Git pulls crawl, drops SSH sessions, slows Docker image downloads and makes internal dashboards unreliable. On distributed teams the work environment includes the network path to private repositories, staging servers, cloud tools and internal APIs.

Before changing code, rebuilding containers or blaming the cloud provider, compare performance with and without the VPN. That habit separates application delay from network delay and gives IT, DevOps and engineering leads the same evidence. It also tells you whether the current setup is reliable enough or whether you should review approved VPN clients for Mac and Windows before standardizing remote access for developers.

How do you prove the VPN causes the delay?

Three test states for VPN latency: no VPN, default company gateway and nearest approved gateway, with the same five checks in each

Developers describe network problems as product problems: “Docker is slow,” “Git keeps hanging,” “the API is broken,” “SSH drops after a few minutes.” Those symptoms can come from the application, but they can equally come from packet loss, a DNS timeout, a distant gateway or poor connection recovery after sleep.

The cleanest test uses three states: no VPN, VPN on the default company gateway and VPN on the closest approved gateway. In each state, run the same operations: ping a public endpoint, connect to a work endpoint, clone a small repository, open an internal URL and do one DNS lookup.

Developer symptomPossible VPN-related causeFirst check
SSH freezes after a few minutesPacket loss, MTU mismatch, unstable tunnelRun a packet-size ping test
Docker image pulls slow downForced tunnel, distant gateway or DNS delayCompare pull time with and without VPN
Internal URLs load slowlyDNS conflict or split DNS issueCheck resolver order
Git clone stallsTCP retransmits or overloaded VPN serverRun traceroute and packet loss tests

If Git, SSH and Docker behave normally without the VPN and slow down once connected, you have a network path problem. If the delay exists before the VPN connects, look at Wi-Fi, local CPU load, Docker storage, package registry performance or the remote service itself.

Which diagnostic routine works on both Mac and Windows?

Results are easier to compare when everyone on the team runs the same short test. It should take less than 10 minutes and use built-in tools only. On macOS the useful commands are ping, traceroute, scutil --dns and dig. On Windows, PowerShell shows latency, routes and DNS settings through Test-NetConnection, tracert, Resolve-DnsName and Get-DnsClientServerAddress.

A practical routine looks like this:

  • Disconnect the VPN and record baseline latency to a public endpoint and a work endpoint.
  • Connect to the default VPN gateway and repeat the tests.
  • Connect to the nearest approved gateway and test again.
  • Run a DNS lookup for one internal service and one public domain.
  • Test SSH or Git with a small repository before testing a large Docker pull.
  • Save the time, location, ISP, operating system, VPN client version, selected protocol and gateway.

That last item matters because Mac and Windows can behave differently on the same home network. Windows may prefer a different adapter metric, while macOS may keep a different resolver order. Docker Desktop, WSL, Hyper-V and the VPN client can each add virtual network layers on top.

How does MTU cause VPN slowdowns?

Diagram of a packet wrapped by VPN encryption and tunnel headers becoming too large for the network path and being fragmented

MTU, the maximum transmission unit, is the largest packet a network path can carry without fragmenting it. A VPN adds overhead through encryption and tunneling. When the VPN wraps a packet, the result can be too large for an ordinary connection, and then large transfers stall, SSH hangs during long output and package installs arrive in bursts.

The fix is to measure packet size, not to copy a value from a forum. Send pings with the don’t-fragment flag set and increase the payload until they fail. On macOS that is ping -D -s, and on Windows ping -f -l. If smaller packets cross the VPN and larger ones do not, the MTU setting deserves attention. Some environments settle on 1400 or 1380, but the right value depends on the tunnel, the ISP, the device and the gateway.

Why does DNS make internal tools feel slow?

DNS problems can make a healthy system feel broken. A developer types an internal hostname, waits several seconds and assumes the application is slow. In reality the laptop may be asking the wrong resolver first, waiting for a timeout and only then using the corporate DNS.

This is common when home routers, public DNS services, VPN clients and split DNS rules overlap. A Mac can show as connected and still use a resolver order that delays internal domains. A Windows machine can send queries through the wrong adapter, or apply name resolution rules differently after sleep or a VPN reconnect.

A useful DNS check covers these points:

  • Confirm whether internal domains resolve only through corporate DNS.
  • Check whether public DNS is still used while the VPN is connected.
  • Compare short hostnames with fully qualified domain names.
  • Test one internal domain and one public domain.
  • See whether the issue appears after sleep, roaming or a VPN reconnect.
  • Clear the DNS cache only after recording the failing behavior.

Which VPN protocol suits developer workloads?

Test protocols against developer behavior, not general browsing. Developers keep SSH sessions open, pull images from registries, sync IDEs, use cloud CLIs, connect to databases and reach private staging systems. A protocol that feels fine for email can be poor for engineering work.

Compare the approved protocols under the same conditions: the same repository clone, Docker pull, SSH session and internal URL. Record the median result, not the fastest run. WireGuard-based setups often feel lighter for modern encrypted tunneling. OpenVPN over UDP usually performs better than OpenVPN over TCP for interactive work. IPsec can be stable in managed enterprise setups, although gateway quality still matters.

A better approach is to define profiles: one for general traffic, one for engineering access and one fallback. The engineering profile should stay secure while using cleaner routing, tested MTU values, reliable DNS and nearby gateways.

When is split tunneling worth using?

A full-tunnel VPN sends most traffic through the company network. That makes control and logging easier, but it also loads the VPN path with package downloads, public container pulls, video calls and large file syncs. Split tunneling sends approved private traffic through the VPN and lower-risk public traffic over the normal internet.

Security, networking and engineering teams should agree on which destinations must stay inside the tunnel: private APIs, admin panels, databases, staging servers and internal Git. If policy allows, public package registries, video calls and general browsing can go direct. For wider tuning ideas, see this guide to improving network performance for your business.

Mac-specific causes

On a Mac, VPN lag can come from client settings, DNS order, network service priority, sleep recovery, endpoint protection tools or outdated extensions. Compare approved VPN clients for Mac on reconnect behavior, split DNS support, useful logs, compatibility with Docker and SSH, and stability after sleep.

Windows-specific causes

On Windows, route and adapter checks are usually the starting point. A laptop can have Wi-Fi, Ethernet, VPN, Docker, WSL, Hyper-V and security-agent adapters active at once. PowerShell shows whether internal traffic uses the expected VPN adapter and whether the DNS servers are correct.

Why is VPN quality a delivery problem?

Resolving VPN latency is part of delivery, not a side task for IT. Slow tunnels change developer behavior: engineers avoid rebuilding containers, postpone pulling updates, keep stale branches or look for unofficial access paths. That hurts code quality and release predictability.

Frequently asked questions

Why is my VPN slow only for Git and Docker?

Both move large amounts of data over many connections, so they expose packet loss, MTU problems and distant gateways more than browsing does. Compare clone and pull times with and without the VPN to confirm.

What MTU should I use for a VPN?

There is no universal value. Some environments use 1400 or 1380, but you should measure with don’t-fragment pings and pick a value that fits your tunnel, ISP, device and gateway.

Is WireGuard faster than OpenVPN?

WireGuard-based setups often feel lighter for modern tunnels, and OpenVPN over UDP usually beats OpenVPN over TCP for interactive work. Test your approved options on the same tasks and compare median results.

Is split tunneling safe?

It can be, if security teams define which destinations must stay inside the tunnel and policy allows the rest to go direct.

What should you do first?

Run the three-state test on one Mac and one Windows laptop, save the results with the gateway and protocol, and fix the biggest gap first. Measure before changing settings, then check MTU, DNS, protocol, gateway load and split tunneling in that order. The goal is a secure setup that gives engineers stable access to the systems they use every day, without a hidden productivity cost.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.