Skip to main content
Solved

Block Python Access Internet

  • April 24, 2025
  • 3 replies
  • 155 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/

This topic has been closed for replies.

3 replies

notskope
  • New Member III
  • April 24, 2025

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


munster
  • Author
  • April 28, 2025

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

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/