0

I want to restrict some IP's to access the website so I'm trying using IP address and domain restrictions feature but it's showing 404 error to allowed IP and for deny IP it's properly showing the request is denied.

I'm configuring this changes on Windows Server 2012 R2 and IIS version 8.5

configuration for the allow IP

configuration for the allow IP

This are feature settings

This are feature settings

Result When IP not added in Allow list

When IP not added in Allow list

Result When IP is added in allow list

When IP is added in allow list

why this page not found is showing?

any other alternative to restrict the IP to access website?

James Z
  • 12,209
  • 10
  • 24
  • 44
Som
  • 598
  • 3
  • 12
  • SO is a programming Q&A platform and this question is not about programming. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) Please delete this and ask, instead, on https://serverfault.com/ – Rob Sep 06 '22 at 11:38
  • Let FRT tell what happens around that 404, https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis – Lex Li Sep 06 '22 at 14:48
  • For testing purposes, revert the changes you did for IP restriction. Then try to access your site and see whether it is accessbile from another machine. It could help to know that your site is working. If still it is getting 404 then could you please check the sub-status of 404? You could find it in the IIS logs. After making sure that your site is acceisble fine, you could apply IP restrictions. – Deepak-MSFT Sep 07 '22 at 05:39
  • I tried without restriction then page is loading properly. again I have added the restriction then it worked fine for allowed IP and once I logged out it again showing 404 error – Som Sep 07 '22 at 09:08
  • Do you mean you logged out from the site or machine and it stopped working? If yes, are you able to log in again? If possible, could you please share the screenshot of the error 404, I would like to see whether there is any sub-status code. does all the allow IP has the same behavior? – Deepak-MSFT Sep 09 '22 at 03:08
  • 404 error changes the URL and ss is attached in question – Som Sep 09 '22 at 08:12
  • The screenshot in the original post is not showing the sub-status code. I would suggest you check the IIS logs and find those requests that have status code 404. Check its sub-status code, it is something like 404.3. – Deepak-MSFT Sep 14 '22 at 09:16

1 Answers1

0

Try adding the server's IP address(es) to the allowed list, because when you go to /sitefinity, the server sends a request to internal endpoint and if that request is blocked then you are getting redirected to your custom error page.

Veselin Vasilev
  • 3,698
  • 1
  • 15
  • 21
  • added server IP in allowed list then also working same for allowed IP and once I logged out it again showing 404 error. Is it sitefinity specific exception or my server specific ? – Som Sep 07 '22 at 09:11
  • so there is a progress now, right? you can now login whereas previously you could not? so, what is the issue now? – Veselin Vasilev Sep 07 '22 at 10:29
  • normally site is working fine no issue at all but client requirement is to whitelist some IP and restrict the site for other IP's – Som Sep 07 '22 at 10:38