### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/local.md Starts a PacketStreamer receiver. Requires a configuration file specifying its behavior. The output can be piped to other tools like tcpdump. ```bash packetstreamer receiver --config [configuration_file] ``` ```bash packetstreamer receiver --config ./contrib/config/receiver-local.yaml ``` ```bash # pass the output file /tmp/dump_file to tcpdump: tail -c +1 -f /tmp/dump_file | tcpdump -r - ``` ```bash # Edit the configuration to write to the special name 'stdout', and pipe output to tcpdump: ./packet-streamer receiver --config ./contrib/config/receiver-stdout.yaml | tcpdump -r - ``` -------------------------------- ### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/quickstart.md Starts a PacketStreamer receiver. It listens on port 8081 and writes pcap output to /tmp/dump_file. Configuration is managed via a YAML file. ```bash ./packetstreamer receiver --config ./contrib/config/receiver.yaml ``` -------------------------------- ### Build PacketStreamer Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/quickstart.md Builds the PacketStreamer application from source. Requires Go toolchain and libpcap-dev. Clones the repository and executes the make command. ```bash # Pre-requisites (Ubuntu): sudo apt install golang-go libpcap-dev git clone https://github.com/deepfence/PacketStreamer.git cd PacketStreamer/ make ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/local.md Starts a PacketStreamer sensor. Requires a configuration file. When running remotely, the configuration should target the remote receiver. ```bash sudo packetstreamer sensor --config [configuration_file] ``` ```bash sudo packetstreamer sensor --config ./contrib/config/sensor-local.yaml ``` -------------------------------- ### Start Local Development Server Source: https://github.com/deepfence/packetstreamer/blob/main/docs/README.md Starts a local development server for the website. Changes are reflected live. You can specify a different port using the --port flag. ```bash $ yarn start # Example with a different port: # yarn start --port 8080 ``` -------------------------------- ### Generate Live Traffic with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/vagrant.md Example command using Vegeta to generate HTTP GET requests at a specified rate and duration, saving results and reporting them. ```bash echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### Test PacketStreamer with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/local.md Generates test traffic using the Vegeta load testing tool to test PacketStreamer. This involves installing Vegeta, defining the attack, and reporting the results. ```go # install vegeta go install github.com/tsenart/vegeta@latest ``` ```bash # install vegeta go install github.com/tsenart/vegeta@latest echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### Generating Live Traffic with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/vagrant.md Example command using Vegeta to generate HTTP GET requests for testing PacketStreamer. ```bash echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### Install Dependencies Source: https://github.com/deepfence/packetstreamer/blob/main/docs/README.md Installs project dependencies using Yarn. This is a prerequisite for local development. ```bash $ yarn ``` -------------------------------- ### Build PacketStreamer Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/README.md Builds the PacketStreamer tool from source. Requires Go toolchain and libpcap-dev to be installed. ```shell # Pre-requisites (Ubuntu): sudo apt install golang-go libpcap-dev git clone https://github.com/deepfence/PacketStreamer.git cd PacketStreamer/ make ``` -------------------------------- ### Build PacketStreamer Source: https://github.com/deepfence/packetstreamer/blob/main/README.md Builds the PacketStreamer tool from source. Requires Go toolchain and libpcap-dev to be installed. ```shell # Pre-requisites (Ubuntu): sudo apt install golang-go libpcap-dev git clone https://github.com/deepfence/PacketStreamer.git cd PacketStreamer/ make ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/quickstart.md Launches a PacketStreamer sensor to capture and forward traffic. Requires editing the sensor configuration file to specify the receiver's address. ```bash # run on the target hosts to capture and forward traffic # copy and edit the sample sensor-local.yaml file, and add the address of the receiver host cp ./contrib/config/sensor-local.yaml ./contrib/config/sensor.yaml ./packetstreamer sensor --config ./contrib/config/sensor.yaml ``` -------------------------------- ### S3 Plugin Documentation Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/plugins/README.md Details on how to configure and use the S3 plugin for streaming packets to an AWS S3 bucket. This includes setup, configuration parameters, and usage examples. ```markdown [S3](./s3.md) ``` -------------------------------- ### Suricata Integration Guide Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/tools/README.md Instructions for integrating Deepfence Packetstreamer with Suricata for enhanced network security monitoring. ```markdown See [Suricata](./suricata.md) for integration details. ``` -------------------------------- ### Running PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/vagrant.md Command to start the PacketStreamer receiver component within a Vagrant environment. ```bash cd PacketStreamer ./packetstreamer receiver --config ./contrib/config/receiver-vagrant.yaml ``` -------------------------------- ### Start and Manage Vagrant VMs Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/vagrant.md Commands to initiate, manage, and check the status of Vagrant virtual machines for the PacketStreamer project. Assumes libvirt provider is configured. ```bash vagrant up vagrant status # Current machine states: # # receiver running (libvirt) # sensor running (libvirt) ``` -------------------------------- ### Vagrant VM Management Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/vagrant.md Commands to start, check status, and SSH into Vagrant managed virtual machines for PacketStreamer. ```bash vagrant up vagrant status # Current machine states: # # receiver running (libvirt) # sensor running (libvirt) ``` ```bash vagrant ssh receiver ``` ```bash vagrant ssh sensor ``` -------------------------------- ### PacketStreamer Receiver Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/README.md Example configuration for the PacketStreamer receiver. Specifies the port to listen on and the output file path for captured packets. ```yaml server: port: 8081 capture: file: /tmp/dump_file ``` -------------------------------- ### PacketStreamer Receiver Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/README.md Example configuration for the PacketStreamer receiver. Specifies the port to listen on and the output file path for captured packets. ```yaml server: port: 8081 capture: file: /tmp/dump_file ``` -------------------------------- ### Load Testing with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/docker.md An example of using Vegeta to perform load testing against a service, simulating 100 requests per second for 5 minutes. The results are saved to results.bin. ```go echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### PacketStreamer Sensor Configuration with S3 Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/plugins/s3.md Example configuration file for running PacketStreamer in sensor mode to stream locally captured packets to an S3 bucket. This snippet demonstrates how to integrate the S3 plugin into the sensor setup. ```bash sudo packetstreamer sensor --config ./contrib/config/sensor-s3.yaml ``` -------------------------------- ### PacketStreamer File Output Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/tools/suricata.md An example configuration for the PacketStreamer receiver to output data to a file, which can then be used as input for Suricata. ```yaml input: address: 0.0.0.0 port: 8081 output: file: path: /tmp/dump_file ``` -------------------------------- ### PacketStreamer Sensor Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/README.md Example configuration for the PacketStreamer sensor. Specifies the server address of the receiver and potentially capture filters. ```yaml server: address: ":8081" capture: bpf_filter: "tcp port 80" ``` -------------------------------- ### Running PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/vagrant.md Command to start the PacketStreamer sensor component within a Vagrant environment, requiring sudo privileges. ```bash cd PacketStreamer sudo ./packetstreamer --config ./contrib/config/sensor-vagrant.yaml ``` -------------------------------- ### Testing PacketStreamer with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/local.md Demonstrates how to use the vegeta load generator to create test traffic for PacketStreamer. This involves installing vegeta, defining a target request, and running the attack, then reporting the results. ```go go install github.com/tsenart/vegeta@latest ``` ```bash echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/local.md Starts a PacketStreamer receiver service. Requires a configuration file to specify its behavior. The output can be piped to other tools like tcpdump for analysis. ```bash packetstreamer receiver --config [configuration_file] ``` ```bash packetstreamer receiver --config ./contrib/config/receiver-local.yaml ``` ```bash tail -c +1 -f /tmp/dump_file | tcpdump -r - ``` ```bash ./packet-streamer receiver --config ./contrib/config/receiver-stdout.yaml | tcpdump -r - ``` -------------------------------- ### PacketStreamer Receiver Configuration for File Output Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/extra/suricata.md Example configuration for PacketStreamer's receiver to output data to a file, which can then be used as input for Suricata. ```yaml input: address: 0.0.0.0 port: 8081 output: file: path: /tmp/dump_file ``` -------------------------------- ### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/README.md Starts the PacketStreamer receiver service. It listens on a specified port and writes captured traffic to a pcap file. Configuration is provided via a YAML file. ```shell ./packetstreamer receiver --config ./contrib/config/receiver.yaml ``` -------------------------------- ### PacketStreamer Sensor Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/README.md Example configuration for the PacketStreamer sensor. Specifies the server address of the receiver and potentially capture filters. ```yaml server: address: ":8081" capture: bpf_filter: "tcp port 80" ``` -------------------------------- ### Display Stringified Site Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This HTML snippet displays the entire Docusaurus site configuration object as a formatted JSON string. It uses the `siteConfig()` function to get the configuration and `JSON.stringify` to format it with an indentation of 2 spaces for readability within a `
` tag.

```html
{JSON.stringify( siteConfig(), null, 2 )}
``` -------------------------------- ### Kubernetes Deployment with Helm Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/kubernetes.md This snippet demonstrates how to deploy PacketStreamer on a Kubernetes cluster using Helm. It first applies a namespace configuration and then installs the PacketStreamer Helm chart. The default deployment includes a DaemonSet for sensors and a receiver instance. Customization options are detailed in the values.yaml file. ```bash kubectl apply -f ./contrib/kubernetes/namespace.yaml helm install packetstreamer ./contrib/helm/ --namespace packetstreamer ``` -------------------------------- ### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/README.md Starts the PacketStreamer receiver service. It listens on a specified port and writes captured traffic to a pcap file. Configuration is provided via a YAML file. ```shell ./packetstreamer receiver --config ./contrib/config/receiver.yaml ``` -------------------------------- ### PacketStreamer Receiver Configuration with S3 Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/plugins/s3.md Example configuration file for running PacketStreamer in receiver mode to stream packets to an S3 bucket. This snippet shows the command to launch the receiver with the S3 output configured. ```bash packetstreamer receiver --config ./contrib/config/receiver-s3.yaml ``` -------------------------------- ### Run PacketStreamer Sensor in Docker Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/docker.md Starts the PacketStreamer sensor component in Docker, requiring host networking and NET_ADMIN capability for packet capture. Mounts configuration files. ```bash docker run --rm -it \ --cap-add=NET_ADMIN --net=host \ -v $(pwd)/contrib/config:/etc/packetstreamer \ deepfenceio/deepfence_packetstreamer \ sensor --config /etc/packetstreamer/sensor-local.yaml ``` -------------------------------- ### Run PacketStreamer Receiver in Docker Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/docker.md Starts the PacketStreamer receiver component within a Docker container. Mounts configuration files and exposes port 8081. ```bash docker run --rm -it \ -v $(pwd)/contrib/config:/etc/packetstreamer \ -v $HOME/container_tmp:/tmp \ -p 8081:8081 \ deepfenceio/deepfence_packetstreamer \ receiver --config /etc/packetstreamer/receiver.yaml ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/README.md Starts the PacketStreamer sensor service on target hosts. Sensors capture traffic, apply filters, and forward it to a central receiver. Configuration, including the receiver address, is provided via a YAML file. ```shell # copy and edit the sample sensor-local.yaml file, and add the address of the receiver host cp ./contrib/config/sensor-local.yaml ./contrib/config/sensor.yaml ./packetstreamer sensor --config ./contrib/config/sensor.yaml ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/README.md Starts the PacketStreamer sensor service on target hosts. Sensors capture traffic, apply filters, and forward it to a central receiver. Configuration, including the receiver address, is provided via a YAML file. ```shell # copy and edit the sample sensor-local.yaml file, and add the address of the receiver host cp ./contrib/config/sensor-local.yaml ./contrib/config/sensor.yaml ./packetstreamer sensor --config ./contrib/config/sensor.yaml ``` -------------------------------- ### Kubernetes Deployment with Helm Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/kubernetes.md Deploys PacketStreamer on Kubernetes using Helm. This involves applying a namespace configuration and then installing the Helm chart. The default deployment includes a DaemonSet for sensors and a receiver instance. ```bash kubectl apply -f ./contrib/kubernetes/namespace.yaml helm install packetstreamer ./contrib/helm/ --namespace packetstreamer ``` -------------------------------- ### Load Testing with Vegeta Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/docker.md Example of using vegeta to perform load testing against a target IP address. It attacks at a rate of 100 requests per second for 5 minutes and reports the results. ```bash echo 'GET http://some_ip:80' | vegeta attack -rate 100 -duration 5m | tee results.bin | vegeta report ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/local.md Starts a PacketStreamer sensor service, typically used for capturing and sending network traffic. Requires a configuration file, and when run remotely, the configuration should target the remote receiver. ```bash sudo packetstreamer sensor --config [configuration_file] ``` ```bash sudo packetstreamer sensor --config ./contrib/config/sensor-local.yaml ``` -------------------------------- ### Basic Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/building.md Builds the packetstreamer binary using the default Go toolchain. ```bash make ``` -------------------------------- ### Static Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/building.md Builds the packetstreamer binary with static linking. ```bash make STATIC=1 ``` -------------------------------- ### Basic Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/build.md Builds the packetstreamer binary using the default Go toolchain. ```bash make ``` -------------------------------- ### Release Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/building.md Builds a stripped version of the packetstreamer binary, suitable for production environments. ```bash make RELEASE=1 ``` -------------------------------- ### Docker Release Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/building.md Builds a stripped release version of the packetstreamer binary using Docker. ```bash make docker-bin RELEASE=1 ``` -------------------------------- ### Docker Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/building.md Builds the packetstreamer binary using Docker. The resulting binary is statically linked with musl and libpcap for portability. ```bash make docker-bin ``` -------------------------------- ### Release Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/build.md Builds a stripped binary for a production environment by setting the RELEASE parameter. ```bash make RELEASE=1 ``` -------------------------------- ### Docker Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/build.md Builds the packetstreamer binary using Docker, resulting in a statically linked and portable binary. ```bash make docker-bin ``` ```bash make docker-bin RELEASE=1 ``` -------------------------------- ### Static Build Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/build.md Statically links the binary by setting the STATIC parameter. ```bash make STATIC=1 ``` -------------------------------- ### Build Docker Image for PacketStreamer Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/quickstart/docker.md Builds a Docker container image for Deepfence PacketStreamer. Supports building a release binary with the RELEASE=1 flag. ```bash make docker-image # Alternatively, build a stripped release binary make docker-image RELEASE=1 ``` -------------------------------- ### Build Docker Image Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/docker.md Builds a Docker container image for PacketStreamer. An optional RELEASE argument can be used to build a stripped release binary. ```bash make docker-image # Alternatively, build a stripped release binary make docker-image RELEASE=1 ``` -------------------------------- ### Navigation Link to Documentation Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This HTML snippet shows how to create a navigation link to a Docusaurus documentation page. It dynamically generates the `href` attribute by accessing the `docId` from the site configuration's theme settings and then cleaning it. The link's label is also retrieved from the theme configuration. ```html
{siteConfig().themeConfig.navbar.items[0].label}
``` -------------------------------- ### SSH into Vagrant VMs Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/vagrant.md Commands to establish SSH connections to the 'receiver' and 'sensor' virtual machines managed by Vagrant. ```bash vagrant ssh receiver ``` ```bash vagrant ssh sensor ``` -------------------------------- ### Retrieve Docusaurus Site Metadata Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This JavaScript function retrieves the site metadata object from Docusaurus. It uses the `useDocusaurusContext` hook to access the context, which includes the site metadata. This function is useful for accessing project-specific metadata defined during Docusaurus installation. ```javascript import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; export function siteMetadata() { const {siteConfig, siteMetadata} = useDocusaurusContext(); return siteMetadata; } ``` -------------------------------- ### S3 Plugin Configuration Schema Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/extra/s3.md Defines the structure for configuring the S3 output plugin, specifying bucket details, region, file size limits, upload chunk size, upload timeout, and canned ACL. ```yaml output: plugins: s3: bucket: _string_ region: _string_ totalFileSize: _file_size_ # optional; default: 10 MB uploadChunkSize: _file_size_ # optional; default: 5 MB uploadTimeout: _timeout_ # optional; default: 1m cannedACL: _acl_ # optional; default: Bucket owner enforced ``` -------------------------------- ### Render Site Title and Tagline Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This HTML snippet demonstrates how to render the site's title and tagline using the `siteConfig` function. It accesses the `title` and `tagline` properties from the returned site configuration object. This is a common pattern for displaying core site information. ```html

{siteConfig().title}

{siteConfig().tagline}

``` -------------------------------- ### Display Stringified Site Metadata Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This HTML snippet displays the Docusaurus site metadata object as a formatted JSON string. It calls the `siteMetadata()` function to retrieve the metadata and then uses `JSON.stringify` with an indentation of 2 spaces for pretty-printing within a `
` tag.

```html
{JSON.stringify(siteMetadata(), null, 2) }
``` -------------------------------- ### Run PacketStreamer Receiver Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/vagrant.md Command to run the PacketStreamer receiver application within a Vagrant VM. Requires navigating to the source directory and specifying the configuration file. ```bash cd PacketStreamer ./packetstreamer receiver --config ./contrib/config/receiver-vagrant.yaml ``` -------------------------------- ### Retrieve Docusaurus Site Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This JavaScript function retrieves the site configuration object from Docusaurus. It utilizes the `useDocusaurusContext` hook to access the context, which contains the site configuration. No external dependencies are required beyond Docusaurus itself. ```javascript import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; export function siteConfig() { const {siteConfig, siteMetadata} = useDocusaurusContext(); return siteConfig; } ``` -------------------------------- ### Run PacketStreamer Sensor with S3 Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/extra/s3.md Command to run PacketStreamer in sensor mode, streaming locally captured packets to S3 using a specified configuration file. ```bash sudo packetstreamer sensor --config ./contrib/config/sensor-s3.yaml ``` -------------------------------- ### Run PacketStreamer Sensor Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/vagrant.md Command to run the PacketStreamer sensor application within a Vagrant VM. Requires root privileges, navigating to the source directory, and specifying the configuration file. ```bash cd PacketStreamer sudo ./packetstreamer --config ./contrib/config/sensor-vagrant.yaml ``` -------------------------------- ### Run PacketStreamer Receiver with S3 Configuration Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/extra/s3.md Command to run PacketStreamer in receiver mode, streaming packets from a receiver to S3 using a specified configuration file. ```bash packetstreamer receiver --config ./contrib/config/receiver-s3.yaml ``` -------------------------------- ### Link to Edit on GitHub Source: https://github.com/deepfence/packetstreamer/blob/main/docs/src/pages/index.md This HTML snippet provides a link to edit the current page on GitHub. It dynamically retrieves the edit URL from the Docusaurus site configuration, specifically from the `presets` array which often contains build-related configurations like edit URLs. ```html
Edit on GitHub
``` -------------------------------- ### PacketStreamer Configuration Structure Source: https://github.com/deepfence/packetstreamer/blob/main/docs-mdbook/src/configuration.md Defines the structure and parameters for the PacketStreamer YAML configuration file. It outlines required and optional settings for input sources, output destinations (including S3 plugin details), TLS encryption, authentication, and performance tuning. ```yaml input: address: _ip-address_ port: _listen-port_ output: server: address: _ip-address_ port: _listen-port_ file: path: _filename_|stdout plugins: s3: bucket: _string_ region: _string_ totalFileSize: _file_size_ uploadChunkSize: _file_size_ uploadTimeout: _timeout_ cannedACL: _acl_ tls: enable: _true_|_false_ certfile: _filename_ keyfile: _filename_ auth: enable: _true_|_false_ key: _string_ compressBlockSize: _integer_ inputPacketLen: _integer_ gatherMaxWaitSec: _integer_ logFilename: _filename_ pcapMode: _Allow_|_Deny_|_All_ capturePorts: _list-of-ports_ captureInterfacesPorts: _map: interface-name:port_ ignorePorts: _list-of-ports_ ``` -------------------------------- ### Run PacketStreamer Receiver on Docker Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/docker.md Runs the PacketStreamer receiver in a Docker container. It mounts a configuration directory and exposes port 8081. ```bash docker run --rm -it \ -v $(pwd)/contrib/config:/etc/packetstreamer \ -v $HOME/container_tmp:/tmp \ -p 8081:8081 \ deepfenceio/deepfence_packetstreamer \ receiver --config /etc/packetstreamer/receiver.yaml ``` -------------------------------- ### Run PacketStreamer Sensor on Docker Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/using/docker.md Runs the PacketStreamer sensor in a Docker container. Requires host networking and NET_ADMIN capability for packet capture. It mounts a configuration directory. ```bash docker run --rm -it \ --cap-add=NET_ADMIN --net=host \ -v $(pwd)/contrib/config:/etc/packetstreamer \ deepfenceio/deepfence_packetstreamer \ sensor --config /etc/packetstreamer/sensor-local.yaml ``` -------------------------------- ### Suricata Analysis from File Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/extra/suricata.md Pipe PacketStreamer's file output to Suricata for real-time analysis. Assumes Suricata is configured with a specific YAML file and PacketStreamer outputs to a designated file. ```bash tail -f /tmp/dump_file | suricata -v -c /etc/suricata/suricata.yaml -r /dev/stdin ``` -------------------------------- ### PacketStreamer Configuration Structure Source: https://github.com/deepfence/packetstreamer/blob/main/docs/docs/packetstreamer/configuration.md Defines the structure and parameters for the YAML configuration file used by PacketStreamer. This includes settings for input sources, output destinations (file, S3), TLS, authentication, compression, and network capture options. ```yaml input: address: ip-address port: listen-port output: server: address: ip-address port: listen-port file: path: filename|stdout plugins: s3: bucket: string region: string totalFileSize: filesize uploadChunkSize: filesize uploadTimeout: timeout cannedACL: acl tls: enable: true|false certfile: filename keyfile: filename auth: enable: true|false key: string compressBlockSize: integer inputPacketLen: integer gatherMaxWaitSec: integer logFilename: filename pcapMode: Allow|Deny|All capturePorts: list-of-ports captureInterfacesPorts: map: interface-name:port ignorePorts: list-of-ports ```