pavel-odintsov / fastnetmon

FastNetMon - very fast DDoS sensor with sFlow/Netflow/IPFIX/SPAN support
https://fastnetmon.com
GNU General Public License v2.0
3.42k stars 568 forks source link

Why didn't checked other traffic or internal traffic for DDOS detection? #472

Closed mahdi1001 closed 7 years ago

mahdi1001 commented 8 years ago

Fastnetmon is good, and it is very fast. We want match "other traffic" and "internal traffic" with ddos detection. but only incoming and outgoing traffic match with ddos detection. is it impossible?!!!

pavel-odintsov commented 8 years ago

Hello!

Unfortunately we haven't support for tracking internal traffic.

But "other" traffic means "not your network traffic" so it's speaking about mistake in configuration (you lost some network in /etc/networks_list) or spoofied traffic in your network.

In normal case should have zero counters for other traffic.

mahdi1001 commented 8 years ago

Hello :) OK, but support for tracking internal traffic is very necessary. Has it the solution?!

pavel-odintsov commented 8 years ago

Hello,

You should add all your networks in /etc/networks_list in CIDR form. After this FastNetMon will detect traffic direction and you could get zero "other" counter.

mahdi1001 commented 8 years ago

TNX. OK, but support for tracking internal traffic is very necessary. Has it the solution?! If my change all direction to outgoing in source code for support tracking , is it correct? has it problem? fro example: in function "get_packet_direction" return just "OUTGOING" for support tracking in all traffic.

pavel-odintsov commented 8 years ago

Hello!

Yep, it's possible. But it's very dirty hack. You could replace this line (packet_direction = INTERNAL;): https://github.com/pavel-odintsov/fastnetmon/blob/1740d754dc1017c298b4a3227705ce7c4b6f0f88/src/fast_library.cpp#L844

By this code:

        subnet = destination_subnet;
        subnet_cidr_mask = destination_subnet_cidr_mask;

        packet_direction = INCOMING;
XCM-jj commented 7 years ago

Hello : repleace (packet_direction = INTERNAL;): can help support "internal traffic" ?

replease it need reinstall ?

thank you .