ZPA packet flow

Hi Guys,

hope you all are good and safe.

I’m new to Zscaler so trying to put all the possible way to get this understand as some things in my pipe line for working with this solution.
so here i want to understand the ZPA packet flow from end user machine perspective.
how Zapp decide that which traffic i need to tunnel for ZPA etc.
how certificates fit into the ZPA picture.

Thank you.

Well, there’s a lot to that, depending on the level of detail you’re looking for. For now I’ll restrict myself to a high-level perspective (which indeed means that it’s not 100% correct, but close enough for the purpose of this question). Feel free to reach out for a more detailed discussion.

I’m presuming you’re already aware of the functional components (Zscaler Client Connector (ZCC), ZPA Service Edge nodes (ZPA SE) and App Connectors. At initiation, all these components enroll into their own Zscaler certificate which is used to establish mutual authenticated TLS connections.
In this example we’ll make a user set up an SSH session to server01.safemarch.com

  1. App Connectors establish a TLS connection to their closest ZPA SE at startup, which is used for configuration updates and signalling between Cloud and Connector
    Similarly, when started (and after authentication) ZCC establishes a TLS connection to its closest ZPA SE at startup and (among others) learns which traffic should be handled by ZPA. This is based on FQDNs, wildcard-domains and (occasionally) IP ranges, and is defined in the global ZPA admin Dashboard.

  2. The user starts the SSH client and initiates a session to server01.safemarch.com. ZCC intercepts the DNS request, sees that it matches the ZPA config and forwards it to the ZPA SE

  3. The ZPA cloud checks for policy, selects one or more App Connectors (based on policy & geographical distance to the user) and asks these candidates if they can resolve and connect to the requested host, and what their latency is towards the destination. Note that only the Connector needs to know the actual host IP address; the ZPA Cloud only needs to know if it was resolved & reachable.
    The ZPA Cloud then elects which App Connector will handle the request, provide a micro tunnel ID to the Connector and another to the ZCC and inform the ZPA SE that these are related

  4. The elected Connector sets up a TLS session to the ZPA SE to which the ZCC is already connected. It also builds the local SSH session to server01.safemarch.com, using its own interface IP address

  5. ZCC generates a synthetic IP address in the 100.64.x.x range and spoofs the DNS response. The SSH client sets up a TCP connection to this address to port 22. ZCC locally terminates the connection, graps the data-part (stripping all TCP/IP information), adds its mtunnel-ID and sends it through the TLS session to the ZPA SE

  6. The ZPA SE removes the ZCC mtunnel-ID, adds the App Connector mtunnel-ID and forwards the packet over the TLS session to the App Connector.

  7. The Connector takes the data-part and injects it into the previously established session to server01.safemarch.com.

  8. Responses from the server are picked up by the Connector & the data-part is send back to the ZPA SE which forwards it to the ZCC which, in turn, delivers the data to the SSH client

And that’s the short of it, hope it helps