0

I'm looking to limit access to Staging CMS by IP. At the same time, the Staging website should be accessible to anyone irrespective of the IP.

The website is hosted on Azure App Service. I configured access restrictions by IP, however that blocks access to the Staging website too. Is there a way I can block access only for the CMS and not the website?

  • Are your CM and CD roles on the same App Service then? – Craig Taylor Mar 17 at 11:38
  • No, they're on two different app services. – shivam Mar 17 at 12:04
  • So, if I am understanding correctly, you want to block the access to cm.yourdomain.com/sitecore but not to cm.yourdomain.com? – Vinicius Deschamps Mar 17 at 17:11
  • Okay, so maybe it’s what Vinicius is saying then because you would otherwise use the “IP Restrictions” settings under “Networking” on your CM app service, publish content to the “web” database, and then view the site on the CD, where there are no restrictions. – Craig Taylor Mar 18 at 12:11
  • @ViniciusDeschamps: Yes that's exactly what I'm looking for. – shivam Mar 18 at 12:36
1

Based on your comments, you want the following

Azure Web App does not offer such feature, and you will need to add a firewall able to handle Layer 7.

From perspective for Azure Application Gateway, you could try using custom rules:

In Azure, you have Azure Application Gateway, and try to address your need by using custom rules

Allowing and blocking traffic is simple with custom rules. For example, you can block all traffic coming from a range of IP addresses. You can make another rule to allow traffic if the request comes from a specific browser.

Source: https://stackoverflow.com/questions/60301639/how-to-restrict-access-to-some-url-path-of-azure-web-service-from-internet

I haven't tested myself but please share your findings later on

| improve this answer | |
  • Thank you for the detailed reply. I will look into this and get back with the findings. – shivam Mar 19 at 8:03
  • I could not get this working since we're using Sitecore 9.0 XP and WAF is supported from 9.1 onwards. Will give this a shot after we upgrade. kb.sitecore.net/articles/682999 – shivam Mar 22 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.