@rbl operator does not support IPv6
Author: airweenCreated Apr 24, 2024Updated Aug 31, 2026
Labelsbug2.x3.xduplicate:1st_place_medal: good first issue
Describe the bug
This is a duplicated issue, the first one is more that 4 years old - see #2210.
Seems like @rbl operator does not support IPv6.
There was the issue #3111, during the investigation I found this behavior.
Logs and dumps
This is what I found the log while I tried the operator:
libmodsecurity3:
Target value: "::1" (Variable: REMOTE_ADDR)
Failed to understand `::1' as a valid IP address, assuming domain format input
RBL lookup of ::1 failed.mod-security2:
Target value: "::1"
RBL lookup of ::1.xbl.spamhaus.org failed at REMOTE_ADDR.The expected format would be:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ipv6.xbl.spamhaus.orgTo Reproduce
Use the rule set given at this issue comment, and send a request:
curl -H "Host: localhost" http://[::1]/Expected behavior
In the log it should be the expected format above, eg:
RBL lookup of 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ipv6.xbl.spamhaus.org failed at REMOTE_ADDR.Server (please complete the following information):
- ModSecurity version (and connector): libmodsecurity3 all versions, mod_security2 all versions
Source: owasp-modsecurity/ModSecurity