Update index.js
This commit is contained in:
1 parent
c4ec58dbb8
commit
98d3019197
1 file changed
+3
-3
@@ -65,16 +65,16 @@ const processLogLine = async (line, test = false) => {
|
|||||||
|
|
||||||
const { srcIp, proto, dpt } = logData;
|
const { srcIp, proto, dpt } = logData;
|
||||||
if (!srcIp) {
|
if (!srcIp) {
|
||||||
return log(1, `Missing SRC in the log line: ${line}`);
|
return log(2, `Missing SRC in the log line: ${line}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ips = getServerIPs();
|
const ips = getServerIPs();
|
||||||
if (!Array.isArray(ips)) {
|
if (!Array.isArray(ips)) {
|
||||||
return log(1, 'For some reason, \'ips\' is not an array');
|
return log(2, 'For some reason, \'ips\' is not an array');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ips.includes(srcIp)) {
|
if (ips.includes(srcIp)) {
|
||||||
return log(1, `Ignoring own IP address! PROTO=${proto?.toLowerCase()} SRC=${srcIp} DPT=${dpt} ID=${logData.id}`);
|
return log(0, `Ignoring own IP address! PROTO=${proto?.toLowerCase()} SRC=${srcIp} DPT=${dpt} ID=${logData.id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report MUST NOT be of an attack where the source address is likely spoofed i.e. SYN floods and UDP floods.
|
// Report MUST NOT be of an attack where the source address is likely spoofed i.e. SYN floods and UDP floods.
|
||||||
|
|||||||
Reference in new issue
Block a user