Comments (1)
There are a couple of things which are complicated about running cyberprobe in containers: Firstly, it's not been documented properly, my bad. Secondly, the cyberprobe bit of cyberprobe fits awkwardly in a container, because it needs special privileges to do network tapping, which may make it complicated to deploy in your environment. But it's doable.
Try this...
-
Groundwork, you need to know your host's IP address from a docker container, the command
ifconfig docker0
tells me my host's address is 172.17.0.1. -
More groundwork, you need to know the name your network interface will appear in a docker container with network admin, which is the same as the host network. The command
ifconfig
tells me my primary network interface is
enp0s3
. -
Create a configuration file for cyberprobe, incorporating network address and interface name. Put that in a file, say,
/cfg/c.cfg
on the host:
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<interfaces>
<interface name="enp0s3"/>
</interfaces>
<targets>
<target address="0.0.0.0/0" liid="my-network"/>
</targets>
<endpoints>
<endpoint hostname="172.17.0.1" port="9000" type="etsi" transport="tcp"/>
</endpoints>
</configuration>
- Run a cyberprobe container using this file, with NET_ADMIN privileges so that it can tap the host network. Note that the -v option is used to pass the configuration file through to the container, and the :z suffix works around any SElinux complications. See how the directory I used for the configuration file gets mapped into /config?
docker run -i -t --network=host \
--cap-add=NET_ADMIN -v /cfg:/config:z \
cybermaggedon/cyberprobe cyberprobe /config/c.cfg
- Deploy cybermon container dumping received events on stdout:
docker run -i -t -p 9000:9000 \
cybermaggedon/cybermon cybermon -p 9000 -c /etc/cyberprobe/json.lua
-
Do some network stuff, you should see JSON output.
-
If you want to start databasing stuff, stop the cybermon container and run an ElasticSearch container:
docker run -p 9200:9200 elasticsearch
and a new cybermon container using db.lua. db.lua has 'localhost' hard-coded as the ElasticSearch URL (sorry again, my bad), so using host networking works around that:
docker run -i -t --network=host -p 9000:9000 \
cybermaggedon/cybermon cybermon -p 9000 -c /etc/cyberprobe/db.lua
- Do some network stuff, then query ElasticSearch:
wget -q -O- 'http://localhost:9200/cyberprobe/_search?q=*'
from cyberprobe.
Related Issues (20)
- cybermon subscribers don't work in containers
- Problem compiling ARM on Pi
- largest cyberprobe implementations? HOT 1
- TLS compilation warning HOT 1
- IP compilation warning HOT 1
- Compilation warning: socket.C HOT 1
- Auto-tests fail for tls-with-cert.pcap on Debian Stretch
- Auto tests fails with tls.pcap on Ubuntu Bionic
- Documentation texinfo error HOT 1
- Inconsistency in thread handling: stop vs join
- The endpoint lock remains locked while any endpoint is in the process of connecting
- Read off end-of-array if port number is 65535. HOT 1
- Compiler warning
- Compiler warning, target.C
- cybermon.C compilation warning
- High latency in packet capture in latest Fedora 30 HOT 1
- Compilation warning, 2.5.0
- Missing pulsar.lua in RPM package
- Hangs when using gRPC (cybermon and eventstream-service) HOT 2
- SEGV in cyberprobe::event::protobufify
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyberprobe.