From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH 2/4] backup.pl: Remove any 3coresec ipblocklists from old backups being restored
Date: Thu, 24 Apr 2025 16:20:39 +0200 [thread overview]
Message-ID: <20250424142041.3443255-2-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20250424142041.3443255-1-adolf.belka@ipfire.org>
- This patch ensures that any restore from an old backup cointaining the 3coresec lists
will not restore the ipblocklist associated files for those lists.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/backup/backup.pl | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index 0cfbd4fc3..b36296ee8 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -252,11 +252,14 @@ restore_backup() {
-out /etc/httpd/server.crt &>/dev/null
fi
- # Remove any entry for ALIENVAULT, SPAMHAUS_EDROP or ABUSECH_BOTNETC2 from the ipblocklist modified file
+ # Remove any entry for ALIENVAULT, SPAMHAUS_EDROP, ABUSECH_BOTNETC2 or 3CORESEC from the ipblocklist modified file
# and the associated ipblocklist files from the /var/lib/ipblocklist directory
sed -i '/ALIENVAULT=/d' /var/ipfire/ipblocklist/modified
sed -i '/SPAMHAUS_EDROP=/d' /var/ipfire/ipblocklist/modified
sed -i '/ABUSECH_BOTNETC2=/d' /var/ipfire/ipblocklist/modified
+ sed -i '/3CORESEC_SSH=/d' /var/ipfire/ipblocklist/modified
+ sed -i '/3CORESEC_SCAN=/d' /var/ipfire/ipblocklist/modified
+ sed -i '/3CORESEC_WEB=/d' /var/ipfire/ipblocklist/modified
if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then
rm /var/lib/ipblocklist/ALIENVAULT.conf
fi
@@ -266,6 +269,15 @@ restore_backup() {
if [ -e /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf ]; then
rm /var/lib/ipblocklist/ABUSECH_BOTNETC2.conf
fi
+ if [ -e /var/lib/ipblocklist/3CORESEC_SSH.conf ]; then
+ rm /var/lib/ipblocklist/3CORESEC_SSH.conf
+ fi
+ if [ -e /var/lib/ipblocklist/3CORESEC_SCAN.conf ]; then
+ rm /var/lib/ipblocklist/3CORESEC_SCAN.conf
+ fi
+ if [ -e /var/lib/ipblocklist/3CORESEC_WEB.conf ]; then
+ rm /var/lib/ipblocklist/3CORESEC_WEB.conf
+ fi
# The collectd directory structure was changed but not all changes
# are done by the official migration script generator
--
2.49.0
next prev parent reply other threads:[~2025-04-24 14:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 14:20 [PATCH 1/4] sources: remove the 3CORESEC ipblocklist entries from the sources file Adolf Belka
2025-04-24 14:20 ` Adolf Belka [this message]
2025-04-24 14:20 ` [PATCH 3/4] update.sh: Core195 - remove any 3coresec ipblocklists during Core Update Adolf Belka
2025-04-24 14:20 ` [PATCH 4/4] core195: Ship backup.pl and sources files Adolf Belka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424142041.3443255-2-adolf.belka@ipfire.org \
--to=adolf.belka@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox