Z-Tunnel 2.0 PAC File - Traffic forwarding to CEN based on origin country

In this scenario, how do we do if we want to forward traffic to a specific Zscaler node when it’s coming from a specific country?

Hi,
we are doing it the following way:

/* Country is Thailand */
var country = “${COUNTRY}”;
if (shExpMatch(country, “Thailand”)) {
return “PROXY XXX.sme.zscalertwo.net:80”;
}

In the FWD one just the typical Tunnel2 bypass statement.

/* Country is Thailand */
var country = “${COUNTRY}”;
if (shExpMatch(country, “Thailand”)) {
return “PROXY ${ZAPP_TUNNEL2_BYPASS}”;
}

1 Like

Thank you Jonas,

I guess that statement goes to the app profile pac.

What statement do we put in the forward profile pac?

Thank you very much Jonas

Hi,
check out this thread:

[Difference in use of “App Profile PAC file” and “Forwarding Profile PAC file” - Client Connector - Zenith (zscaler.com)]
Difference in use of "App Profile PAC file" and "Forwarding Profile PAC file" - #14 by Andreas

At the end there is a description what to add in which pac for tunnel 2.0.
Of course you will need some if-statements to select the “correct/desired” return statement. :wink:
Best regards
Andreas