0

We have an IIS site right now that has an allow list for a specific list of IP addresses, and all other IPs denied by default. We want to add another rule, that states that if the request coming in as a user-agent of a specific value, then allow it, regardless of if the IP is on the allow list or not. Is this possible?

M.R.
  • 143
  • 1
  • 8

1 Answers1

1

I don't see an easy solution for you in the stock IIS functionality. The <ipSecurity> HTTP module doesn't support factoring-in the User-Agent as part of the block decision, and the <filteringRules> module doesn't support using the client IP address.

I think you're going to be stuck writing a custom IIS module to do what you want.

Do remember that the User-Agent field is under the control of the client, so basing some kind of security decision on it is probably ill advised.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328