The firewall needs to be on avast free doesn't have one. The win7 firewall has outbound protection, but it is disabled by default, so it shouldn't be getting in the way.
OK, you said you did this:
Then I downloaded the avast clean and desinstalled the program in the secure mode and installed it again in the normal windows.
Normally we suggest a clean reinstall and in a specific order, whilst you may have done that, it is just to seek confirmation.
1. Uninstall avast from the control panel > programs and features > avast, if it suggests a repair or anything else ignore the suggestion and continue with the uninstall.
2. After the uninstall reboot.
3. Run the avast uninstall utility, from normal mode. The uninstall utility will ask to do this in safe mode, answer Yes. It will handle the boot to safe mode and run the utility, reboot.
4. now install the latest version of avast.