Update index.js
This commit is contained in:
parent
c4ec58dbb8
commit
98d3019197
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
|
@ -65,16 +65,16 @@ const processLogLine = async (line, test = false) => {
|
|||
|
||||
const { srcIp, proto, dpt } = logData;
|
||||
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();
|
||||
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)) {
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue