Set IPv6_SUPPORT to false

This commit is contained in:
Sefinek committed 2025-05-20 01:28:51 +02:00
1 parent f1f88aa546
commit 40eaeeca6a
1 file changed
+55
+55
View File
@@ -0,0 +1,55 @@
exports.MAIN = {
/* --------------------------- Server --------------------------- */
SERVER_ID: 'development', // Server identifier (e.g., 'hp-terminal', 'pl-cluster', 'de1'). Use 'development' for testing only. 'production' has no effect. Use null to leave it unset.
EXTENDED_LOGS: false, // Specifies whether the script should display additional information in the logs.
UFW_LOG_FILE: 'D:\\test\\ufw.log',
CACHE_FILE: './tmp/ufw-abuseipdb-reporter.cache',
/* --------------------------- Network --------------------------- */
IP_ASSIGNMENT: 'dynamic', // IP assignment type: 'static' for a fixed IP, 'dynamic' if it may change over time.
IP_REFRESH_SCHEDULE: '0 */6 * * *', // Cron schedule for checking the public IP assigned by your ISP. Used only with dynamic IPs to prevent accidental self-reporting. If IP_ASSIGNMENT is set to 'static', the script will check your IP only once.
IPv6_SUPPORT: false, // IPv6 support: true if the device has a globally routable address assigned by the ISP.
/* --------------------------- Reports --------------------------- */
ABUSEIPDB_API_KEY: '0a44c26b277ec000945970613fa49438e6ff9b8032f9d104ac678456407bd69b1c554344d05f680d', // https://www.abuseipdb.com/account/api
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_SCHEDULE: '0 15,17,18,20 * * *', // Cron schedule for automatic script updates. Default: every day at 15:00, 17:00, 18:00, 20:00
/* --------------------------- Discord Webhooks --------------------------- */
DISCORD_WEBHOOK_ENABLED: false, // Enables sending Discord webhooks with error reports, execution status, and other events.
DISCORD_WEBHOOK_URL: 'https://discord.com/api/webhooks/988193436349919252/xD2AYCCV-2GgxtNX5H87daMe8iKGBtxdc33xzSkWm0DGASJc26cUQi6yv2EOvmKfpCMx',
DISCORD_WEBHOOK_USERNAME: 'SERVER_ID', // Username shown as the message author. Use null for default. 'SERVER_ID' will resolve to this.MAIN.SERVER_ID.
};
// Generates a report submission.
const serverId = this.MAIN.SERVER_ID ? `on ${this.MAIN.SERVER_ID} ` : '';
exports.REPORT_COMMENT = ({ date, srcIp, dstIp, proto, spt, dpt, In, Out, mac, len, ttl, id, tos, prec, res, window, urgp, syn }, fullLog) =>
`Blocked by UFW ${serverId}[${dpt}/${proto?.toLowerCase()}]
Source port: ${spt}
TTL: ${ttl}
Packet length: ${len}
TOS: ${tos}
This report was generated by:
https://github.com/sefinek/UFW-AbuseIPDB-Reporter`; // Please don't delete this URL, I'd be very grateful. Thank you! 💙
// Alternative version:
// exports.REPORT_COMMENT = ({ date, srcIp, dstIp, proto, spt, dpt, In, Out, mac, len, ttl, id, tos, prec, res, window, urgp, syn }, fullLog) =>
// `Blocked by UFW ${serverId}[${dpt}/${proto?.toLowerCase()}]. Generated by: https://github.com/sefinek/UFW-AbuseIPDB-Reporter`;
// See: https://www.abuseipdb.com/categories
const categories = {
21: '14,5,18', // FTP: Port Scan, FTP Brute-Force, Brute-Force
22: '14,22,18', // SSH: Port Scan, SSH, Brute-Force
23: '14,23,18', // Telnet: Port Scan, IoT Targeted, Brute-Force
53: '14,1,2', // DNS: Port Scan, DNS Compromise, DNS Poisoning
80: '14,21', // HTTP: Port Scan, Web App Attack
443: '14,21', // HTTPS: Port Scan, Web App Attack
};
exports.DETERMINE_CATEGORIES = ({ dpt }) => categories[dpt] || '14'; // Default: Port Scan