Skip to content

Instantly share code, notes, and snippets.

@duboisf
Last active July 1, 2026 14:49
Show Gist options
  • Select an option

  • Save duboisf/40fa6f4036f708d32dd1c34a3af6805a to your computer and use it in GitHub Desktop.

Select an option

Save duboisf/40fa6f4036f708d32dd1c34a3af6805a to your computer and use it in GitHub Desktop.
ufw rules to get zscaler working on linux
sudo ufw allow in on zcctun0 proto any from 10.0.0.0/8 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9000
sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9010
sudo ufw allow in on zcctun0 proto udp from 100.64.0.0/16 to 100.64.0.1
@duboisf

duboisf commented Jul 14, 2021

Copy link
Copy Markdown
Author

the udp rule is for dns queries, otherwise the first dns query times out after 5 seconds (second query with your usual dns servers works). This is because when you enable zscaler it prepends a dns server to your usual list and that one gets blocked by ufw. You can see your dns config with

cat /etc/resolv.conf

@duboisf

duboisf commented Jul 14, 2021

Copy link
Copy Markdown
Author
ip route | grep tun0
10.0.0.0/8 via 100.64.0.1 dev tun0 scope link 
100.64.0.0/16 via 100.64.0.1 dev tun0 scope link 
100.64.0.0/16 dev tun0 proto kernel scope link src 100.64.0.1 

@duboisf

duboisf commented Jul 14, 2021

Copy link
Copy Markdown
Author

ok trying to access stuff behind zscaler I see I might be missing other rules 😭

@duboisf

duboisf commented Jul 14, 2021

Copy link
Copy Markdown
Author

ok so was trying to connect to a server in 10.0.0.0/8 and it wasn't working, so added another rule:

sudo ufw allow in on tun0 proto tcp from 10.0.0.0/8 to 100.64.0.1 port 9000

@duboisf

duboisf commented Feb 1, 2022

Copy link
Copy Markdown
Author

Was having issues updating zscaler, saw that apparmor was blocking zscaler, found https://help.zscaler.com/client-connector/resolving-auto-update-issues-zscaler-client-connector-linux-1.2

@duboisf

duboisf commented Feb 1, 2022

Copy link
Copy Markdown
Author

Had to uppate the ufw rules as the interface name is now zcctun0, used to be tun0.

@LyndonArmitage

Copy link
Copy Markdown

This solved the Endpoint FW/AV Error issue I was having on Manjaro with ZScaler 1.4.1.41, thanks!

@MaxymVlasov

Copy link
Copy Markdown

Works perfectly on Ubuntu 22.04 with ZScaler 1.5.0.37. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment