From 106880d4cece61de80beb4f80c24e0ea30b3e035 Mon Sep 17 00:00:00 2001 From: Alex Chen Date: Fri, 17 Apr 2026 01:27:42 +0000 Subject: [PATCH] docs: Improve INCLUDES section documentation in jail.conf.5 Add detailed examples and explanations for the [INCLUDES] section: - Explain that files are relative to the configuration directory - Document support for multiple files and globbing patterns - Provide practical examples for common use cases - Add note about missing file behavior Closes #4076 --- man/jail.conf.5 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man/jail.conf.5 b/man/jail.conf.5 index 6a6ac849..7fc9ae2f 100644 --- a/man/jail.conf.5 +++ b/man/jail.conf.5 @@ -87,6 +87,28 @@ indicates that the specified file is to be parsed before the current file. .TP .B after indicates that the specified file is to be parsed after the current file. +.PP +The [INCLUDES] section allows you to include configuration files relative to the directory of the current configuration file. Multiple files can be specified by separating them with whitespace. Globbing patterns using '*' and '?' are supported. +.PP +Examples: +.RS +.nf +# Include a single file before the current configuration +[INCLUDES] +before = common.conf + +# Include multiple files +[INCLUDES] +before = common.conf paths-debian.conf +after = custom.local + +# Include files matching a glob pattern +[INCLUDES] +before = /etc/fail2ban/paths-*.conf +.fi +.RE +.PP +Note: If an included file does not exist, fail2ban will currently ignore it without warning. Ensure that file paths are correct to avoid misconfigurations. .RE Using Python "string interpolation" mechanisms, other definitions are allowed and can later be used within other definitions as %(name)s.