📜 ⬆️ ⬇️

Pythonhosted.org is mistakenly blocked by Roskomnadzor

The reason for writing the article was the absence of references to this event in RuNet. The reason for this, presumably, is the failure of providers to comply with the requirements of the RKN, which will be discussed below. I managed to find it only in the corporate network. But there is no doubt that sooner or later it will affect everyone.


Parse and details under the cut.


Causes of blocking


On April 4, the Moscow City Court ruled in case No. 3-0154 / 2019 on permanently blocking 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 records related to the court decision appeared in the Roskomnadzor lock register :



In their presence, you can see for yourself.


Effects


As I mentioned above, the IP addresses of the pythonhosted.org and the blocked resource match, 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 does not have a goal to parse the details of the work of pip, you just need to know that the package index is stored on the pypi.org domain, the files themselves on files.pythonhosted.org. As a result, working with a standard package manager becomes difficult or not at all possible.


For those who have already touched


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


Options


  1. Global VPN or Proxy
  2. Individual proxy for pip
    It is possible to set via the pip --proxy $proxy ... environment variables, the explicit pip --proxy $proxy ... argument pip --proxy $proxy ... or the configuration file . All options support the format [user:pass]@host:port .
  3. Use alternative package index
    The key option is the index-url , which also, like a proxy, can be transferred using the methods described above.
  4. Pypi.org corporate / home mirror upgrade
    The most noble and the most complex, and it requires as much as 6 TB on disk space ( here is a dashboard with information on resources, including the PyPI Mirror Size graph).
  5. Use IPv6
    There are DNS entries 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 be surprising, because such situations occur, and occur regularly. I do not urge to write complaints against Roskomnadzor or to sue for broken pipelines. But it is worth preparing in advance.


')

Source: https://habr.com/ru/post/453608/


All Articles