Is your avast firewall network profile in
puplic or
private mode?
Setting up Firewall Application Rules in Avast Antivirus
https://support.avast.com/en-eu/article/Antivirus-Firewall-Application-Rules========================================================
NOTE: Network profiles control the settings that determine how strictly Firewall protects your PC. Each time you access a known network, Avast remembers and applies the applicable Firewall profile (as previously set by you). Each time you connect to a new network, Avast prompts you to select the appropriate profile. The default profile setting when no profile is selected is Public. The network profiles are:
Private: a lower level of security suitable for when your PC is connected to a trusted network such as your home or work network.
This profile enables better connectivity, and permits all communication within the network.Public: a higher level of security suitable for when your PC is connected to a public network such as in a cafe or airport.
Because public networks present greater security risks, no incoming communication is permitted when this profile is set.=======================================================