diff --git a/config.default.js b/config.default.js index 5f70f8b..8ab895f 100644 --- a/config.default.js +++ b/config.default.js @@ -15,7 +15,7 @@ exports.MAIN = { IP_REPORT_COOLDOWN: 12 * 60 * 60 * 1000, // Minimum time between reports of the same IP. Must be >= 15 minutes. Do not set values like 1 hour, as it wouldn't make sense due to rate limits. /* --------------------------- Automatic Updates --------------------------- */ - AUTO_UPDATE_ENABLED: true, // Automatic updates: true to enable auto-update via 'git pull', false to disable. + AUTO_UPDATE_ENABLED: false, // Automatic updates: true to enable auto-update via 'git pull', false to disable. AUTO_UPDATE_SCHEDULE: '15,17,18,20 * * *', // Cron schedule for automatic script updates. Default: every day at 15:00, 17:00, 18:00, 20:00 /* --------------------------- Discord Webhooks --------------------------- */ @@ -44,24 +44,21 @@ https://github.com/sefinek/UFW-AbuseIPDB-Reporter`; // Please don't delete this // See: https://www.abuseipdb.com/categories const categories = { - TCP: { - 22: '14,22,18', // Port Scan | SSH | Brute-Force - 80: '14,21', // Port Scan | Web App Attack - 443: '14,21', // Port Scan | Web App Attack - 8080: '14,21', // Port Scan | Web App Attack - 25: '14,11', // Port Scan | Email Spam - 21: '14,5,18', // Port Scan | FTP Brute-Force | Brute-Force - 53: '14,1,2', // Port Scan | DNS Compromise | DNS Poisoning - 23: '14,15,18', // Port Scan | Hacking | Brute-Force - 3389: '14,15,18', // Port Scan | Hacking | Brute-Force - 3306: '14,16', // Port Scan | SQL Injection - 6666: '14,8', // Port Scan | Fraud VoIP - 6667: '14,8', // Port Scan | Fraud VoIP - 6668: '14,8', // Port Scan | Fraud VoIP - 6669: '14,8', // Port Scan | Fraud VoIP - 9999: '14,6', // Port Scan | Ping of Death - }, - UDP: {}, + 22: '14,22,18', // Port Scan | SSH | Brute-Force + 80: '14,21', // Port Scan | Web App Attack + 443: '14,21', // Port Scan | Web App Attack + 8080: '14,21', // Port Scan | Web App Attack + 25: '14,11', // Port Scan | Email Spam + 21: '14,5,18', // Port Scan | FTP Brute-Force | Brute-Force + 53: '14,1,2', // Port Scan | DNS Compromise | DNS Poisoning + 23: '14,15,18', // Port Scan | Hacking | Brute-Force + 3389: '14,15,18', // Port Scan | Hacking | Brute-Force + 3306: '14,16', // Port Scan | SQL Injection + 6666: '14,8', // Port Scan | Fraud VoIP + 6667: '14,8', // Port Scan | Fraud VoIP + 6668: '14,8', // Port Scan | Fraud VoIP + 6669: '14,8', // Port Scan | Fraud VoIP + 9999: '14,6', // Port Scan | Ping of Death }; -exports.DETERMINE_CATEGORIES = ({ proto, dpt }) => categories[proto]?.[dpt] || '14'; // Default: Port Scan \ No newline at end of file +exports.DETERMINE_CATEGORIES = ({ dpt }) => categories[dpt] || '14'; // Default: Port Scan \ No newline at end of file diff --git a/index.js b/index.js index 4d8f47c..57783f9 100644 --- a/index.js +++ b/index.js @@ -148,6 +148,9 @@ const processLogLine = async (line, test = false) => { await require('./scripts/services/version.js'); } + // Fetch IPs + await refreshServerIPs(); + // Load cache await loadReportedIPs(); @@ -158,11 +161,6 @@ const processLogLine = async (line, test = false) => { await sendBulkReport(); } - // Fetch IPs - logger.log('Trying to fetch your IPv4 and IPv6 address from api.sefinek.net...'); - await refreshServerIPs(); - logger.log(`Fetched ${getServerIPs()?.length} of your IP addresses. If any of them accidentally appear in the UFW logs, they will be ignored.`, 1); - // Check UFW_LOG_FILE if (!fs.existsSync(UFW_LOG_FILE)) { logger.log(`Log file ${UFW_LOG_FILE} does not exist`, 3); diff --git a/scripts b/scripts index 245f3a4..3a8c3e2 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 245f3a43b2656ea11744638b81288e3747219bcb +Subproject commit 3a8c3e2dfde19575fbcd19e879a7c424e81d9f28