Pythonhosted.org mistakenly blocked by Roskomnadzor

The reason for writing the article was the lack of mention of this event in Runet. The reason for this, presumably, is the providers' non-compliance with the ILV requirements, which will be discussed below. I managed to find it only on the corporate network. But there is no doubt that sooner or later it will affect everyone.


Analysis and details under the cut.


Reasons for blocking


On April 4, the Moscow City Court ruled in case No. 3-0154 / 2019 on the permanent blocking of streamable.com resources . However, for reliability, the ILV also blocked its IP addresses, which coincidentally coincide with the addresses of pythonhosted.org.


As a result , the following entries related to the court decision appeared in the register of locks of Roskomnadzor :


  • streamable.com
  • 151.101.193.63
  • 151.101.129.63
  • 151.101.1.63
  • 151.101.65.63

You can verify their availability yourself.


Effects


As I mentioned above, the IP addresses of pythonhosted.org and the locked resource are the same, which is easy to confirm:


Hidden text
> dig pythonhosted.org
; <<>> DiG 9.11.5-P1-1ubuntu2.4-Ubuntu <<>> pythonhosted.org
;; global options: +cmd
;; Got answer: ...
;; ANSWER SECTION:
pythonhosted.org.       10      IN      A       151.101.1.63
pythonhosted.org.       10      IN      A       151.101.129.63
pythonhosted.org.       10      IN      A       151.101.193.63
pythonhosted.org.       10      IN      A       151.101.65.63
;; Query time: ...
> dig streamable.com
; <<>> DiG 9.11.5-P1-1ubuntu2.4-Ubuntu <<>> streamable.com
;; global options: +cmd
;; Got answer: ...
;; ANSWER SECTION:
streamable.com.         60      IN      A       151.101.65.63
streamable.com.         60      IN      A       151.101.193.63
streamable.com.         60      IN      A       151.101.129.63
streamable.com.         60      IN      A       151.101.1.63
;; Query time: ...

This article has no purpose to analyze the details of pip, you just need to know that the package index is stored on the pypi.org domain, the files themselves are on files.pythonhosted.org. As a result, working with a standard package manager becomes difficult or not possible at all.


For those who have already been touched


Here is a short list of the most popular options for using pip. It does not pretend to be encyclopedic; for fine details, it is better to refer to the official documentation .


Options


  1. Global VPN or proxy
  2. Individual proxy for pip
    is possible to set environment variables HTTP_PROXY, HTTP_PROXYwhose explicit argument pip --proxy $proxy ...or configuration file . All options support the format [user:pass]@host:port.
  3. Using an alternative packet index
    A key option is index-urlthat, like proxies, you can pass in the ways described above.
  4. Raising a corporate / home mirror pypi.org
    The noblest and most complex, and disk space requires as much as 6 TB ( here is a dashboard with information on resources, including the PyPI Mirror Size graph ).
  5. Use IPv6
    There are DNS records for pythonhosted.org with IPv6 addresses that have not been blocked. But not every provider or network supports this protocol.

Conclusion


The news is unlikely to surprise, because such situations occur, and occur regularly. I do not call for scribbling complaints about Roskomnadzor or suing for broken pipelines. But get ready in advance.


Also popular now: