OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: logi on September 15, 2024, 03:13:49 PM

Title: How to delete Cron created by the IDS service, that is no longer being used
Post by: logi on September 15, 2024, 03:13:49 PM
Yesterday I was playing with the services and turned ON the IDS, then turned it OFF, now I have a Disabled entry in the Cron section in Settings:

Description: ids rule updates
Command: Update and reload intrusion detection rules

I have tried all the possible options to delete it and it is impossible, what should I do to remove it? Thank you
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: Patrick M. Hausen on September 15, 2024, 03:26:26 PM
Have you tried enabling the IDS, deleting the cron job, disabling the IDS again?
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: logi on September 15, 2024, 03:28:55 PM
Quote from: Patrick M. Hausen on September 15, 2024, 03:26:26 PM
Have you tried enabling the IDS, deleting the cron job, disabling the IDS again?

When IDS is enabled make sense for the cron to exist, I don't want to delete it then, I think when the IDS is being disable, in the clean up process, this leftover cron should have been deleted
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: Patrick M. Hausen on September 15, 2024, 03:31:15 PM
I mean to get rid of it - enable, delete, disable. The end result is IDS disabled and cron job deleted.
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: logi on September 15, 2024, 03:40:15 PM
Didn't work with the IDS service ON, this cron is coming from the Schedule Section in:

Services: Intrusion Detection: Administration: Schedule

Once, you have enabled IDS one time, I think this cron gets created, and it is not removed when IDS is Disabled.
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: Seimus on September 16, 2024, 09:57:12 AM
Are you speaking about the cronjobs visible in System > Settings > Cron?

Those are created using configd in
/usr/local/opnsense/service/conf/actions.d/

Have a look there in the files, find the related task in the file that contains it and remove the task.
https://docs.opnsense.org/development/backend/configd.html

Regards,
S.
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: franco on September 16, 2024, 10:20:21 AM
You don't get rid of the cron job, you just disable it.


Cheers,
Franco
Title: Re: How to delete Cron created by the IDS service, that is no longer being used
Post by: logi on September 18, 2024, 12:29:42 AM
Thank you