# Location where the rulefiles are stored.
our $rulespath = "/var/lib/suricata";
+# Location to store local rules. This file will not be touched.
+our $local_rules_file = "$rulespath/local.rules";
+
# File which contains the rules to whitelist addresses on suricata.
our $whitelist_file = "$rulespath/whitelist.rules";
# Skip rules file for whitelisted hosts.
next if ("$rulespath/$file" eq $whitelist_file);
+ # Skip rules file with local rules.
+ next if ("$rulespath/$file" eq $local_rules_file);
+
# Delete the current processed file, if not, exit this function
# and return an error message.
unlink("$rulespath/$file") or return "Could not delete $rulespath/$file. $!\n";