RouterOS Upgrade fails because of the firewall

Mikrotik fails to upgrade. It resolves the URL but hangs on ‘finding out latest version’
The process workf when all firewall rules are disabled.
What ports, protocols and ip addesses does it use?


thanks