Knowledge Base

Support Policies

IIS URL Rewrite - Restrict X-Forwarded-For/X-MS-Forwarded-Client-IP

Description:

This article is to inform how to restrict specific IP's coming in via URL rewrite for x-forwarded-for or x-ms-forwarded-client-ip.

 

  1. First, go to the realm that you would like to restrict IP access to (if it's global, then do it on the top level).  Then double click on URL Rewrite.  If you do not have it, please install it via Microsoft official website (this requires a reboot).
    iis1.png

  2. Once here, right click to Add Rule.
    iis2.png

  3. Then select Request Blocking and fill out the following.
    iis3.png
    iis4.png

  4. Once you're done with the rule, double click on the rule to edit the REMOTE ADDRESS.
    iis6.png

  5. From here, please change REMOTE_ADDR to HTTP_X_MS_FORWARDED_CLIENT_IP in order to use this parameter to block the incoming IPs.
    iis5.png

  6. This should require no IIS reset; and you're done!  Happy restricting. :)

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.