Skip to main content
Solved

Block Python Access Internet

  • Apr 24, 2025 12:43 AM UTC
  • 3 replies
  • 391 views

munster

Hi

Is there anyway to block python from access internet to download packages?

Whether from VSC or cmdline, etc?

 

thank

 

Best answer by notskope

You can accomplish that with a custom cert-pinned application and a “block” entry in your steering config.

 

Define a cert-pinned application with the executable of python.exe, py.exe, python3.exe etc…

You can then use a steering exception to block access to domains you don’t want those applications to have access to.

 

https://docs.netskope.com/en/certificate-pinned-applications/

View original
This topic has been closed for replies.

3 replies

notskope
  • New Member III
  • Apr 24, 2025 2:02 PM UTC

Sure, create a policy to block pypi.org, or any other package repo you’d like to block.


munster
  • Author
  • Apr 28, 2025 8:29 AM UTC

Hi notskope

I like to block pip or python.exe or VSC to access internet but allowed by trusted repo eg. pypi.org

For EDGE or CHROME, they can access those sites to read the documentation without restriction.

Pls advise

Thank


notskope
  • New Member III
  • Answer
  • May 1, 2025 1:11 PM UTC

You can accomplish that with a custom cert-pinned application and a “block” entry in your steering config.

 

Define a cert-pinned application with the executable of python.exe, py.exe, python3.exe etc…

You can then use a steering exception to block access to domains you don’t want those applications to have access to.

 

https://docs.netskope.com/en/certificate-pinned-applications/