Ubuntu – Running “sudo apt-get update” returns connection errors

18.04windows 10windows-subsystem-for-linux

After installing Ubuntu 18.04 from the Windows store I open Bash and want to run sudo apt-get update, but this returns the following errors:

Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
  Connection failed [IP: 80]
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
  Connection failed [IP: 80]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Connection failed [IP: 80]
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Connection failed [IP: 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Connection failed [IP: 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Connection failed [IP: 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Connection failed [IP: 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Connection failed [IP: 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

When I open in a browser, it shows the site without a problem.

Previously this worked without any problem, but I did a clean reinstall of Windows and now it doesn't work anymore. It seems some firewall or proxy issue, but I tried with the firewall disabled and I got the same result.

Any idea why this is happening?
Maybe it is a 18.04 issue? If so, is it possible to return to 16.04 on Windows 10? Becasue I don't see a uninstall option.

Best Answer

This was caused by Kaspersky Total Security version 2019. It is a known issue that this version blocks HTTP and HTTPS traffic from consoles. It will be solved in the 2020 version next year, so in the meantime I uninstalled the 2019 version and reinstalled the 2018 version.