Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/manual/rules-decoders/rule-lists.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,31 @@ Creating cdb lists the following file format is specified: ::

key1:value
key2:value
key3:diff value
key3:diff value

Each key must be unique and is terminated with a colon ``:``.

Comments
^^^^^^^^

Trailing comments are supported with the multi-character delimiter ``###``.
Everything from ``###`` to the end of the line is discarded at compile time.
Spaces and tabs immediately before ``###`` are also removed so the stored
value does not retain trailing whitespace.

A single ``#`` is **not** treated as a comment marker, so keys and values may
still contain ``#`` (for example URL fragments).

Example: ::

### Approved internal networks
192.168.:RFC 1918 Address space ### private LAN
10.:RFC 1918 Address space
url:https://example.com/page#anchor ### keep the # in the value

Blank lines and lines that are only a ``###`` comment are ignored.
Lines without a ``:`` are also ignored.

For IP addresses the dot notation is used for subnet matches ::

key CIDR Possible matches
Expand Down
3 changes: 2 additions & 1 deletion docs/programs/ossec-makelists.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ossec-makelists
The ``ossec-makelists`` utility to compile cdb databases.
``ossec-makelists`` will scan ossec.conf for database files, check the mtime, and recompile all out of date databases.

See :ref:`manual-rule-lists` for more information.
See :ref:`manual-rule-lists` for the list file format (including ``###`` trailing comments)
and for more information.

ossec-makelists argument options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading