From b76ac179361b8d6429b195e79aeb811afbbd51d6 Mon Sep 17 00:00:00 2001 From: Sefinek Date: Sun, 13 Apr 2025 16:47:03 +0200 Subject: [PATCH] Update --- config.default.js | 2 +- install.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config.default.js b/config.default.js index d0f2ff3..5d1c926 100644 --- a/config.default.js +++ b/config.default.js @@ -1,7 +1,7 @@ exports.MAIN = { // My Server UFW_LOG_FILE: '/var/log/ufw.log', - CACHE_FILE: '/tmp/ufw-abuseipdb-reporter.cache', + CACHE_FILE: '/var/cache/sefinek/ufw-abuseipdb-reporter.cache', SERVER_ID: null, // The server name that will be visible in the reports (e.g., 'homeserver1'). If you don't want to define it, leave the value as null. IP_REFRESH_SCHEDULE: '0 */6 * * *', // CRON: How often should the script check the IP address assigned by the ISP to prevent accidental self-reporting? Default: every 6 hours IPv6_SUPPORT: true, // Specifies whether the device has been assigned an IPv6 address. diff --git a/install.sh b/install.sh index 5173e10..979de40 100644 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ cat << "EOF" |_|_| |_|\__\___|\__, |_| \__,_|\__|_|\___/|_| |_| |___/ - >> Made by sefinek.net || Last update: 20.03.2025 << + >> Made by sefinek.net || Last update: 13.04.2025 << This installer will configure UFW-AbuseIPDB-Reporter, a tool that analyzes UFW logs and reports to AbuseIPDB the IP addresses that have violated firewall rules. Join my Discord @@ -193,16 +193,18 @@ else exit 1 fi -# Create logs directory -echo "📂 Creating /var/log/ufw-abuseipdb directory..." +# Create directories & set permissions +echo "📂 Creating directories and setting permissions..." sudo mkdir -p /var/log/ufw-abuseipdb -sudo chown "$USER":"$USER" /var/log/ufw-abuseipdb -R +sudo chown -R "$USER":"$USER" /var/log/ufw-abuseipdb +sudo mkdir -p /var/cache/sefinek +sudo chown -R "$USER":"$USER" /var/log/ufw-abuseipdb # Change permissions for UFW log file echo "🔒 Changing permissions for $ufw_log_path..." sudo chmod 644 "$ufw_log_path" -# Install pm2 +# Install PM2 echo "📦 Installing PM2..." sudo npm install pm2 -g -silent