Skip to content

Conversation

@touchweb-vincent
Copy link

Hello,

Here is a proposal to manage this correctly :

SecRule REMOTE_ADDR "!@ipMatch 145.226.0.0/24,2001:4860:4801:3c::/64" "chain"

@touchweb-vincent touchweb-vincent changed the title Handling CIDR correctly Handling CIDR & AuditLogPartsValue correctly Oct 30, 2025
@touchweb-vincent touchweb-vincent changed the title Handling CIDR & AuditLogPartsValue correctly fix: CIDR & AuditLogPartsValue syntax Oct 30, 2025
@airween
Copy link
Contributor

airween commented Oct 30, 2025

Hi @touchweb-vincent,

thanks for this contribution!

Could you add some tests which provide that the parser works as we expect with the mentioned tokens?

You can see existing test file for examples. Let us know if you need any help.

touchweb-vincent and others added 2 commits October 30, 2025 14:10
Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
@touchweb-vincent
Copy link
Author

HI @airween

I don’t have the level to fully understand what’s expected, and I don’t have time to catch up right now.

I’ve written the rules to be tested - what remains is to complete the desired assertions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants