Sign inSign up

robcowart/samplicator

By robcowart

Updated over 7 years ago

Samplicator can be used to forward UDP packets to multiple destinations.

Image
0

10K+

robcowart/samplicator repository overview

Samplicator

A Docker Container for Samplicator ( https://github.com/sleinen/samplicator ). Samplicator can be used to forward UDP packets to multiple destinations.

Usage

The usage convention for samplicator is...

$ sudo docker run -it --network host robcowart/samplicator:1.0.0_1.3.8rc1 [<option>...] [<destination>...]

The allowed <option>s are...

OptionDescription
-d <level>to set the debugging level
-s <address>to set interface address on which to listen for incoming packets (default any)
-p <port>to set the UDP port on which to listen for incoming packets (default 2000)
-b <buflen>size of receive buffer (default 65536)
-c <configfile>specify a config file to read
-x <delay>to specify a transmission delay after each packet, in units of microseconds
-Smaintain (spoof) source addresses
-ndon't compute UDP checksum (only relevant with -S)
-ffork program into background
-m <pidfile>write the process ID to a file
-4IPv4 only
-6IPv6 only
-hto print a usage message and exit
-u <pdulen>size of max pdu on listened socket (default 65536)

Each <destination> should be specified as <addr>[/<port>[/<interval>[,ttl]]], where...

ParameterDescription
<addr>IP address of the receiver
<port>port UDP number of the receiver (default 2000)
<freq>number of received datagrams between successive copied datagrams for this receiver.
<ttl>The TTL (IPv4) or hop-limit (IPv6) for outgoing datagrams.

Config file format:

a.b.c.d[/e.f.g.h]: receiver ...

where:

a.b.c.d     is the sender's IP address
e.f.g.h     is a mask to apply to the sender (default 255.255.255.255)
receiver    see above.

Receivers specified on the command line will get all packets, those specified in the config-file will get only packets with a matching source.

Starting Samplicator with docker-compose

The following docker-compose configuration is an example of using samplicator to forward Netflow, IPFIX, sFlow, Syslog and SNMP Traps.

version: '3'
services:
  samplicator-netflow:
    image: robcowart/samplicator:1.0.1_1.3.8rc1
    container_name: samplicator-netflow
    restart: unless-stopped
    network_mode: host
    command: -s 0.0.0.0 -p 2055 -S -d 0 192.0.2.11/2055 192.0.2.12/2055

  samplicator-ipfix:
    image: robcowart/samplicator:1.0.1_1.3.8rc1
    container_name: samplicator-ipfix
    restart: unless-stopped
    network_mode: host
    command: -s 0.0.0.0 -p 4739 -S -d 0 192.0.2.11/4739 192.0.2.12/4739
    
  samplicator-sflow:
    image: robcowart/samplicator:1.0.1_1.3.8rc1
    container_name: samplicator-sflow
    restart: unless-stopped
    network_mode: host
    command: -s 0.0.0.0 -p 6343 -S -d 0 192.0.2.11/6343 192.0.2.12/6343

  samplicator-syslog:
    image: robcowart/samplicator:1.0.1_1.3.8rc1
    container_name: samplicator-syslog
    restart: unless-stopped
    network_mode: host
    command: -s 0.0.0.0 -p 514 -S -d 0 192.0.2.11/514 192.0.2.12/514

  samplicator-snmptrap:
    image: robcowart/samplicator:1.0.1_1.3.8rc1
    container_name: samplicator-snmptrap
    restart: unless-stopped
    network_mode: host
    command: -s 0.0.0.0 -p 162 -S -d 0 192.0.2.11/162 192.0.2.12/162

Tag summary

Content type

Image

Digest

Size

11.3 MB

Last updated

over 7 years ago

docker pull robcowart/samplicator:1.0.1_1.3.8rc1