Packetbeat for network packet analysis with ELK stack.
1.3K
Dockerfile to build a Packetbeat container image.
If you find this image useful you can help by doing one of the following:
Host Network
You need to give your image access to the host network by providing --net=host option to Docker.
Elasticsearch
Prior to using this image, you should already have an instance of Elasticsearch running, which is accessible by Docker from where you intend to run this image.
Automated builds of the image are available on Dockerhub and is the recommended method of installation.
docker pull proteansec/packetbeat:latest
Alternatively you can build the image locally.
git clone https://github.com/proteansec/packetbeat.git
cd packetbeat
docker build -t proteansec/packetbeat .
We have to give packetbeat container access to the host network interface by specifying the --net=host parameter to be able to sniff the packets from it.
When running packetbeat container on the same host as elasticsearch, we can run it with the following command, since the container connects to Elasticsearch on localhost:9200 by default.
docker run --name packetbeat -d --net=host -d proteansec/packetbeat app:start
When running packetbeat container on a different host as elasticsearch, we have to run it with appropriate environment variables:
docker run --name packetbeat -d --net=host --env 'ELASTICHOSTS="\"host:920\""' -d proteansec/packetbeat app:start
Now you should have the Packetbeat running, which will sniff the traffic from chosen network interface and send it to Elasticsearch.
Refer to the documentation for the --env-file flag, which allows you to specify all environmental variables in a single file, which saves you from using overly complicated docker run commands.
Below is the complete list of available options that can be used to customize your packetbeat container instance.
true to enable saving the traffic information to elasticsearch (default: true).true to enable saving the traffic information to logstash (default: false).true to enable saving the traffic information to a file (default: false).Content type
Image
Digest
sha256:00a5e8fed…
Size
123.2 MB
Last updated
almost 11 years ago
docker pull proteansec/packetbeat