Skip to main content

ModSec: X-Forwarded-For: Rule processing failed

Comments

3 comments

  • cPanelLauren
    If this is a custom rule you might also look here for assistance: ModSecurity: Download Code
    0
  • fuzzylogic
    I'm guessing, but your rule in Phase 1 (Request headers) on match it issues the Drop command... [QUOTE] drop Description: Initiates an immediate close of the TCP connection by sending a FIN packet.
    Your rule then attempts to write a response header "status:411" which cannot occur until Phase 3 (Response headers) If you want your rule to execute in Phase 1 (Request headers) remove "status:411". If you want it to work as is change its operating Phase to Phase 3 (Response headers). (kind of defeats the purpose of resource protection) If you want it to operate in Phase 1 (Request headers) and log the 411 status change the disruption to deny These are untested by me so may be incorrect.
    0
  • servtastic
    All good suggestions but still no luck. Further information: If the X-Forwarded-For only contains a single Ip address, the rule does not error If the X-Forwarded-For contains 2 ip addresses, separated by a comma - that's when the rule failure occurs. Example: ukraine via soflayer in NL: X-Forwarded-For: 193.106.30.99, 169.46.84.217 Result: ModSecurity: Rule processing failed Same IP via mojobroadband.co X-Forwarded-For: 193.106.30.99, 208.86.120.136 Result: ModSecurity: Rule processing failed Different error - same issue :( Same IP set and rule do not fail on REMOTE_ADDR, only X-Forwarded-For with more than one IP Steve
    0

Please sign in to leave a comment.