diff --git a/config.default.js b/config.default.js index 6ea7f90..530f76a 100644 --- a/config.default.js +++ b/config.default.js @@ -3,7 +3,8 @@ exports.MAIN = { UFW_LOG_FILE: '/var/log/ufw.log', CACHE_FILE: '/tmp/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: '*/20 * * * *', // Cron: How often should the script check the IP address assigned by the ISP to prevent accidental self-reporting? Default: every 20 minutes + 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. // Reporting ABUSEIPDB_API_KEY: '', // Secret API key for AbuseIPDB. diff --git a/index.js b/index.js index 726abff..2b5f42a 100644 --- a/index.js +++ b/index.js @@ -121,8 +121,9 @@ const processLogLine = async (line, test = false) => { loadReportedIPs(); - log(0, 'Fetching your IP addresses...'); + log(0, 'Trying to fetch your IPv4 and IPv6 address from api.sefinek.net...'); await refreshServerIPs(); + log(0, `Fetched ${getServerIPs()?.length} of your IP addresses. If any of them accidentally appear in the UFW logs, they will be ignored.`); if (!fs.existsSync(UFW_LOG_FILE)) { log(2, `Log file ${UFW_LOG_FILE} does not exist`); @@ -156,8 +157,6 @@ const processLogLine = async (line, test = false) => { } log(0, `Ready! Now monitoring: ${UFW_LOG_FILE}`); - log(0, '====================================================================='); - process.send && process.send('ready'); })(); diff --git a/scripts b/scripts index 150fb53..4582f3c 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 150fb53fbdd0ff6429c298f7d697488854328a5f +Subproject commit 4582f3ce9de4f852ba17bdbe516e319ec6d75686