Firewall blocks connection to remote host [WSL in VS Code]

  • Local OS Version: Windows 10, version 1903
  • Avast V. 19.7.2388 (build 19.7.4674.524)
  • UI Version: 1.0.402

Right after upgrading Windows to 1903, the firewall is blocking my remote WSL connection in VS code. The error is:

Error: connect ETIMEDOUT 127.0.0.1:51072

Before, the Windows upgrade, it was working fine…

When I disable the firewall it works. But I dont know how to fix this without disabling the firewall.

The firewall is in public mode and setting it to private does nothing.

I tried the solutions from these threats without success also:
https://forum.avast.com/index.php?topic=227130.msg1505540#msg1505540
https://forum.avast.com/index.php?topic=227737.msg1516087#msg1516087

In the firewall logs, it seems that svchost.exe is related, but checking the application rules, all connections are allowed.

https://i.imgur.com/fzEBLim.png

Any help here?

Here is the log from VS Code also.

https://i.imgur.com/Q3elyQe.png

You need allow the node.js embedded in WSL to pass through the firewall.

https://imgur.com/download/lCipVQ6/