Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cronjob or something to remove tcpdump file #79

Open
ad1tya2 opened this issue Feb 1, 2021 · 1 comment
Open

Add Cronjob or something to remove tcpdump file #79

ad1tya2 opened this issue Feb 1, 2021 · 1 comment

Comments

@ad1tya2
Copy link

ad1tya2 commented Feb 1, 2021

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

@jgmdev
Copy link
Owner

jgmdev commented Feb 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants