Microsoft publishes a JSON file containing the required FQDNs and IP ranges for the Windows Update service. You can download it here:
Other Microsoft services (like Office 365), you can find the required endpoints, ports, and IP ranges here:
You should allow access to the following FQDNs on port 443 for SmartScreen service:
- *.smartscreen.microsoft.com
- *.smartscreen-prod.microsoft.com
NuGet: api.nuget.org
Chocolatey: chocolatey.org
hope this list helps