owasp-modsecurity / owasp-modsecurity/ModSecurity
@rbl operator does not support IPv6
@airween is already working on this.
Since Apr 24, 2024.
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.8k
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 1
Description
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.org
To 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.