Skip to content

Commit

Permalink
config: load custom rules (#27)
Browse files Browse the repository at this point in the history
Allow the addition of a custom rule files to meet specific user needs.

NethServer/dev#6222
  • Loading branch information
gsanchietti committed Jul 7, 2020
1 parent 05c1cfe commit b359028
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.rst
Expand Up @@ -47,6 +47,13 @@ Example: ::
Host=192.168.0.1
status=disabled

Custom rules
============

If a file named ``/etc/suricata/rules/custom.rules``, it will be included inside Suricata configuration.
After creating the file, remember to add it to the configuration backup: ::

echo /etc/suricata/rules/custom.rules >> /etc/backup-config.d/custom.include

Troubleshooting
===============
Expand Down
3 changes: 3 additions & 0 deletions root/etc/e-smith/templates/etc/suricata/suricata.yaml/10base
Expand Up @@ -76,6 +76,9 @@ rule-files:
}
}

if ( -f "/etc/suricata/rules/custom.rules" ) {
$OUT .= " - custom.rules\n";
}
}

classification-file: /etc/suricata/classification.config
Expand Down

0 comments on commit b359028

Please sign in to comment.