The application talked to its database from the office every day. Then someone enabled the commercial VPN client on the same laptop, and the connection began resetting after the handshake. Nothing in the application changed, the tunnel reports healthy, and the firewall you control has no blocking rule. What changed is the exit path: provider servers are shared, high-volume endpoints, and providers filter outbound ports to reduce abuse. Database and mail submission ports take most of it, because those are the ports that attract scanning and spam from an anonymous address pool.

The five-minute test that separates filtering from everything else

From the same machine, probe one port that must be open and the port that fails, on the same host, with the tunnel up and then down. Use the same command both times so the only variable is the tunnel:

Test-NetConnection db.example.com -Port 443
Test-NetConnection db.example.com -Port 5432
nc -vz -w3 db.example.com 5432

Four outcomes cover almost every case. If 443 works and 5432 fails only with the tunnel up, you are looking at port filtering on the exit path. If both fail with the tunnel up and both work without it, the problem is routing or DNS rather than port policy. If both ports connect but the application still fails, the fault is authentication or TLS, not reachability. And if only one provider server location fails, it is per-server policy, so try another location before touching any configuration.

Option one: split tunnel the database subnet

If the laptop only needs the commercial VPN for other purposes, exclude the database's address range from the tunnel so that traffic never enters the shared exit at all. This is the cleanest option when the two paths genuinely do not need to meet, and it costs nothing beyond a routing rule you can document. The tradeoff is that split tunneling introduces a second policy surface: what is excluded from the tunnel has to be deliberate, not a side effect of a subnet someone added later.

It stops working the moment the database lives inside the network the VPN is supposed to reach, so check that before committing to it.

Option two: your own endpoint, your own egress

Running a small VPN endpoint on a VPS puts you in control of the egress policy, and no shared pool is involved. That is the option worth comparing honestly against the commercial client: you gain a predictable source address and lose the provider's global footprint and convenience. For a team that needs database and mail ports all day, the trade usually favors owning the endpoint, because the failure mode becomes your own misconfiguration rather than someone else's abuse policy.

Compare the two on source address stability, who can read your traffic, and what happens on the day the endpoint's provider changes its own filtering.

Option three: take the laptop out of the path

A CI job, a scheduled container, or a bastion host inside the allowed network does not depend on a human's tunnel state. Reach the database by SSH tunnel from a host that is already allowed, and the laptop never speaks to the port directly. This is the option that scales when several people hit the same restriction, and it is also the one that removes the problem instead of routing around it.

It is more work up front than a split-tunnel rule, and it does not help the one person who needs an interactive session right now.

Why allowlisting the provider's address is the wrong comparison

Adding the provider's exit address to a database allowlist does work, and it also grants access to every other subscriber sharing that address at that moment. For a read-only replica behind a narrowly granted application account, the exposure might be tolerable for a day. For anything writable it is not a tradeoff worth naming, and rotating exit addresses make it worse: each server change breaks the rule, and the maintenance invites broad CIDR entries that defeat the purpose of an allowlist.

Dedicated or static addresses, where the provider sells them, are the only version of this that scales. Key the allowlist to an address that is yours alone, or do not key it at all.

Whatever you choose, write down the path and the reason. The next person will meet the same reset connection and will start by blaming the application.

Ngaahi tokoni fekau'aki