travelping / docker-pcap Goto Github PK
View Code? Open in Web Editor NEWA docker image to run as site-car container capturing packets and rotating the capture files
A docker image to run as site-car container capturing packets and rotating the capture files
Capturing multiple interfaces should be supported, i.e. a list of interfaces is passed as config in environment and each of the interfaces is captured.
Two options:
a) One capture file per interface
b) One capture file with traffic of all interfaces
Replacing tcpdump
with dumpcap
might be helpful.
As tshark
is used now, extended filter syntax can be used (tshark read filter). It should be allowed to pass an extended filter as option to the container in addition to the pcap filter. The pcap filter should always be applied for efficiency. The extended filter should only apply if given as argument.
From dumpcap man page regarding -f <capture filter>
:
This option can occur multiple times. If used before the first occurrence of the -i option, it sets the default capture filter expression. If used after an -i option, it sets the capture filter expression for the interface specified by the last -i option occurring before this option. If the capture filter expression is not set specifically, the default capture filter expression is used if provided.
Hence, the filter expression must precede the interfaces. Having different filters per interface must not be supported by this container, IMHO. If I want to trace different stuff on different interface, I would run this container several times.
It should be possible to truncate captured packets by supporting the -s <snaplen>
option.
In addition to MAXFILESIZE
and MAXFILENUM
, also the duration
option of tshark (also availbale in dumpcap) should be supported. Capture files can rotate on e.g. daily, even if not filled up.
The MAXFILESIZE
and MAXFILENUM
envrionment variables are defined, but not considered when running the container as the values are hard-coded in the Dockerfile
.
In latest manual the capture rotation option -b
also supports an interval
option to extend the duration
attribute and streamline the rotation of file, i.e. to always rotate at 00:00 and 12:00.
Update the dumpcap/tshark to a version supporting this feature.
While tcpdump
used MB as unit, tshark
is using kB. Hence, at present the MAXFILESIZE
parameter is not applied correctly. That parameter should stick to MB, but the tshark
parameter must be set accordingly.
Optionally, uploading trace files to an S3 bucket should be supported.
The file prefix to be used should be configurable.
If capture files from different hosts are collected, there is a name clash at present, so all files need to be manually renamed. Configuring a filename prefix would already create appropriate names for the capture files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.