A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
FWIW i did it with a simple URL Rewrite Rule. I edited the web.config file by adding this rule and it works perfectly for my environment. No access to ECP from anywhere at all except from the Exchange Server itself. If you need to add additional IP addresses (maybe from a LAN PC) that you want to allow to have access to it, you can add them after this line: <add input="{REMOTE_ADDR}" pattern="^127.0.0.1$" negate="true" />
<rule name="Block External Access To ECP" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{UrlDecode:{REQUEST_URI}}" pattern="(?=.*ecp)" />
<add input="{REMOTE_ADDR}" pattern="^127\.0\.0\.1$" negate="true" />
</conditions>
<action type="Redirect" url="https://your.domain.com" appendQueryString="false" />
</rule>