Pgcli connects in seconds to most Postgres databases. But when Zscaler sits in the middle, everything changes. Pgcli Zscaler configuration issues can waste hours. Understanding how Zscaler intercepts connections is the difference between frustration and resolution.
Pgcli is a fast, feature-rich Postgres client with autocomplete and syntax highlighting. It uses a direct TCP connection to connect to a database host over port 5432 by default. Zscaler, however, often inspects or filters traffic using SSL inspection, custom root certificates, or strict firewall rules. It's here that common problems emerge.
The first barrier is packet interception. If SSL inspection is on, Pgcli may reject the connection due to certificate mismatch. Installing the Zscaler certificate into your system trust chain allows Pgcli to complete the TLS handshake. Skipping this step leads to errors like SSL routines:ssl3_get_server_certificate:certificate verify failed.
The second barrier is outbound connection policy. Zscaler may block direct PostgreSQL ports unless explicitly allowed by policy. Using an SSH tunnel or a VPN can bypass this, but the cleanest solution is having your network team whitelist the database host and port.