Skip to content

Input matcher that checks that an IP belongs to a list of CIDR ranges #16568

@aguinet

Description

@aguinet

Title: An input matcher that checks that an IP{v4,v6} belongs to a list of CIDR ranges

Description:
This input matcher takes an IPv4 or v6 address as input and returns true if it belongs to a list of given CIDR ranges. It uses the existing LcTrie facility.

The configuration is simple and looks like this:

cidr_ranges:
- address_prefix: "1.1.1.0"
  prefix_len: 24
- address_prefix: "2.2.0.0"
  prefix_len: 16
...

I have implemented it here: curiefense@e4601bb

If it can be sponsored, I will open the associated PR!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions