OPNsense Forum

English Forums => General Discussion => Topic started by: wbennett on April 22, 2023, 03:42:04 PM

Title: Cron Job for updating Unbound DNSBLs
Post by: wbennett on April 22, 2023, 03:42:04 PM
I am trying to figure out how to create a cron job for Unbound DNSBL blocklists. I went under System/Settings/Cron but I don't see anything regarding DNSBL under the dropdown list. Any help would be appreciated.

Update: Solved - Didn't scroll down far enough  :-[

What list(s) would you recommend?
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: DEC670airp414user on July 02, 2023, 12:47:43 PM
I only use the threat fox database.   it takes up at least 28% of memory on my 4gb Dec670
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: logi on September 09, 2024, 01:22:00 PM
If I use a custom link for the blocklist (URLs of Blacklists) instead of the predefined Type of DNSBL, will the cron I had created for the automatic daily (Update Unbound DNSBLs) download will also pull the updates from  the custom URLs of Blocklists link? Thanks
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: dinguz on September 09, 2024, 06:30:40 PM
Yes, it does work, they are updated at the times specified in the cron job.
BTW I am using the Hagezi blocklists: https://github.com/hagezi/dns-blocklists (https://github.com/hagezi/dns-blocklists)
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: logi on September 09, 2024, 06:43:54 PM
Quote from: dinguz on September 09, 2024, 06:30:40 PM
Yes, it does work, they are updated at the times specified in the cron job.
BTW I am using the Hagezi blocklists: https://github.com/hagezi/dns-blocklists (https://github.com/hagezi/dns-blocklists)

I am also using Hagezi, my blocklist is the Hagezi Pro ++.

I selected the format: Wildcard Asterisk (Blocky (v0.23 or newer), Nebulo, NetDuma, OPNsense, YogaDNS), because it says OPNsense, is this the correct one for OPNsense?

https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro.plus.txt

Or should I use RPZ (Response Policy Zone, Bind, Knot, PowerDNS, Unbound), because I says unbound?

https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/rpz/pro.plus.txt

Thank you
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: logi on September 09, 2024, 06:46:32 PM
Quote from: dinguz on September 09, 2024, 06:30:40 PM
Yes, it does work, they are updated at the times specified in the cron job.
BTW I am using the Hagezi blocklists: https://github.com/hagezi/dns-blocklists (https://github.com/hagezi/dns-blocklists)

Regarding the cron job, I am not a cron expert, I used the default:

0 0 * * * : This means run daily at midnight 00:00? Please could you confirm

Thanks a lot
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: doktornotor on September 09, 2024, 07:13:06 PM
Quote from: logi on September 09, 2024, 06:46:32 PM
at midnight 00:00

00:00 is midnight normally, confirmed.  ;D

https://man.freebsd.org/cgi/man.cgi?crontab(5)
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: logi on September 09, 2024, 07:15:09 PM
Quote from: doktornotor on September 09, 2024, 07:13:06 PM
Quote from: logi on September 09, 2024, 06:46:32 PM
at midnight 00:00

00:00 is midnight normally, confirmed.  ;D

https://man.freebsd.org/cgi/man.cgi?crontab(5)

Thank you, I forgot the parenthesis midnight (00:00), appreciate the help
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: dinguz on September 10, 2024, 04:53:35 PM
Quote from: logi on September 09, 2024, 06:43:54 PM
I selected the format: Wildcard Asterisk (Blocky (v0.23 or newer), Nebulo, NetDuma, OPNsense, YogaDNS), because it says OPNsense, is this the correct one for OPNsense?

Or should I use RPZ (Response Policy Zone, Bind, Knot, PowerDNS, Unbound), because I says unbound?

Wildcard asterisk is the correct one, the RPZ file is an Unbound native format which isn't understood by the OPNsense download / install / update handling logic. You can also check this if you look in the unbound logging, if you select the wrong file format it isn't being recognized.
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: vivekmauli14 on September 14, 2024, 10:26:54 AM
QuoteI went under System/Settings/Cron

Hi,

How can I extend this list on my own, I went through the code but couldn't find anything related to adding anything in the cron from the UI, I could find All the actions.d commands there but no clue on how to add/remove items from that list.

Can anyone help me with this? Thanks in Advance!

Best,
VivekSP
Title: Re: Cron Job for updating Unbound DNSBLs
Post by: chemlud on September 14, 2024, 05:31:20 PM
Quote from: vivekmauli14 on September 14, 2024, 10:26:54 AM
QuoteI went under System/Settings/Cron

Hi,

How can I extend this list on my own, I went through the code but couldn't find anything related to adding anything in the cron from the UI, I could find All the actions.d commands there but no clue on how to add/remove items from that list.

Can anyone help me with this? Thanks in Advance!

Best,
VivekSP

example given here:

https://forum.opnsense.org/index.php?topic=10740.msg49334#msg49334