-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorporating new Suricata rules (and removing old ones) without restarting the Suricata containers #589
Comments
After some debugging with the user I replied with this. Pasting here for tracking purposes.
|
A user asked about the ability to pick up new custom suricata rules without stopping/starting the suricata container. Mainly, the ability to have rules files placed in
./suricata/rules/
get incorporated into the new suricata.yaml config file and rules deleted from there to be remove.This documentation suggests a restart of the
live-suricata
process via supervisord, but I'm suspicious if that's actually correct because I don't see how that would regenerate the config file.I gave this command:
docker compose exec -u 1000 suricata-live bash -c '/usr/local/bin/suricata_config_populate.py --suricata /usr/bin/suricata-offline -vv && kill -USR2 $(pidof suricata) && echo "Suricata reload signaled"'
as a temporary workaround, but it was reported that old rules were not removed.
So the task is:
figure out what needs to happen to (if necessary, which I think it is, as I think it enumerates the custom rules files and appends their paths to the yaml file), for a command for new suricata rules to be added to the file and now-missing suricata rules to be removed, and to reload the rules in suricata (probably with thatI've determined this is actually working the way it should. There are some nuances with Kubernetes (see my long comment below) but I don't think it's really much that can be done about it atm. It's doable, you just have to get the files you want intoUSR2
signal)/opt/suricata/rules
in the container (and the ones you don't want out) and run the same command to restart it as indicated in the new documentation. The policy manager feature ("policy manager" for Malcolm and Hedgehog Linux (meta-issue) #396) will change how this is done anyway.Closing this bug with just the documentation fix.
The text was updated successfully, but these errors were encountered: