jgmdev / ddos-deflate

Fork of DDoS Deflate with fixes, improvements and new features.
Other
774 stars 263 forks source link

Add Cronjob or something to remove tcpdump file #79

Open ad1tya2 opened 3 years ago

ad1tya2 commented 3 years ago

I ended up getting a 2tb pcap file and crashing my server due to this....

jgmdev commented 3 years ago

Since I don't use that feature never noticed this huge issue. After reading tcpdump manual it seems we can use the -C flag which says:

-C file_size
              Before writing a raw packet to a savefile, check whether the file is currently larger than file_size and, if so,
              close the current savefile and open a new one.  Savefiles after the first savefile will have the name  specified
              with  the -w flag, with a number after it, starting at 1 and continuing upward.  The units of file_size are mil‐
              lions of bytes (1,000,000 bytes, not 1,048,576 bytes).

Then, check for old pcap files each time the cloud flare ip scanner runs and delete them.