IP and URL analysis in IIS 10

Sergey Knyazev 60 Reputation points
2025-02-10T19:12:11.33+00:00

Good afternoon! It is necessary to filter connections to the server by IP address and the presence of a certain phrase in the URL. For example, there are two users: one connects by URL https:\animals.eu\cats\1513515 , and the other one connects by URL https:\animals.eu\dogs\43434 . I need to analyze the ip address from which the connection is going on, and then if the URL contains \dogs, then prohibit access to it, display a separate page. In other cases, allow connection. Is it possible to do this via IIS 10 version?

Windows development Internet Information Services
Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2025-02-11T08:48:48.7133333+00:00

    Hi @Sergey Knyazev,

    It is necessary to filter connections to the server by IP address and the presence of a certain phrase in the URL.

    There are two directions:

    1. If you filter by IP address, you can use the IP and Domain Restrictions module.
      1. Select your website -> double click module IP and Domain Restrictions -> Add Deny Entry... - > Enter the <IP address you want> in Specific IP address textbox.
    2. If you filter by URL, you can use the URL Rewrite module.
      1. Download and install URL Rewrite Module via: https://www.iis.net/downloads/microsoft/url-rewrite
      2. Open the URL Rewrite module, Click the Add Rules option, select Request Blocking rule template and click the OK button.
      3. Set configuration like this (You can modify it according to your needs): User's image
      4. Click "OK" to finish the configuration.

    For more details, you can refer to relevant docs: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

    Best regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Sergey Knyazev 60 Reputation points
    2025-02-14T10:27:20.43+00:00

    aaaaaaaaaaaaaa

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.