Giter VIP home page Giter VIP logo

zeek-netmap's Introduction

Zeek::Netmap

This plugin provides native NETMAP support for Zeek as a packet source.

This repository is derived from zeek/bro-netmap which is not actively maintained and doesn't support zeek. The difference between zeek-netmap and bro-netmap is some meta data.

Installation

Follow NETMAP's instructions to get its kernel module and, potentially, custom drivers installed. Then install this plugin through the Zeek Package Manager.

git clone https://github.com/WqyJh/zeek-netmap
zkg install ./zeek-netmap

To use NETMAP, Zeek needs read and write access to /dev/netmap. If you give that permission to a user, you can run Zeek as non-root.

Usage

Once installed, you can use NETMAP interfaces/ports by prefixing them with either netmap:: or vale:: on the command line. For example, to use NETMAP to monitor interface eth0.

zeek -i netmap::eth0

Netmap does not enable promiscuous mode on interfaces, you'll have to do that yourself. For example, on Linux.

ifconfig eth0 promisc

Cluster

To use it in production with multiple zeek processes, start an zeek cluster.

The cluster includes frontend and backend.

Run frontend with lb in the following way, which divide the traffic into 2 netmap pipes (adjust the number of pipes for your environment) named as zeek.

lb -i eth1 -p zeek:2

Config the netmap workers for the cluster in node.cfg. lb_procs should equal to the number of zeek pipes. Here's an mininum config example.

[manager]
type=manager
host=localhost

[proxy-1]
type=proxy
host=localhost

[worker-1]
type=worker
host=localhost
lb_method=custom
lb_procs=2
interface=netmap::zeek

Use zeekctl to start the cluster.

$ zeekctl
[ZeekControl] > install
[ZeekControl] > start
[ZeekControl] > exit

zeek-netmap's People

Contributors

wqyjh avatar

Watchers

 avatar  avatar

zeek-netmap's Issues

What version of zeek did you use

I have followed the instructions for installing your zeek-netmap plugin. I start lb as follows:

lb -i ens1f0 -p zeek:6

265.392496 main [590] interface is ens1f0
265.460937 main [697] successfully opened netmap:ens1f0
265.460949 main [768] opening pipe named netmap:zeek{0/xT@1
265.461141 main [783] successfully opened pipe #1 netmap:zeek{0/xT@1 (tx slots: 1024)
265.461150 main [788] zerocopy enabled
265.461154 main [768] opening pipe named netmap:zeek{1/xT@1
265.461191 main [783] successfully opened pipe #2 netmap:zeek{1/xT@1 (tx slots: 1024)
265.461197 main [788] zerocopy enabled
265.461199 main [768] opening pipe named netmap:zeek{2/xT@1
265.461232 main [783] successfully opened pipe #3 netmap:zeek{2/xT@1 (tx slots: 1024)
265.461244 main [788] zerocopy enabled
265.461248 main [768] opening pipe named netmap:zeek{3/xT@1
265.461280 main [783] successfully opened pipe #4 netmap:zeek{3/xT@1 (tx slots: 1024)
265.461286 main [788] zerocopy enabled
265.461289 main [768] opening pipe named netmap:zeek{4/xT@1
265.461320 main [783] successfully opened pipe #5 netmap:zeek{4/xT@1 (tx slots: 1024)
265.461326 main [788] zerocopy enabled
265.461328 main [768] opening pipe named netmap:zeek{5/xT@1
265.461368 main [783] successfully opened pipe #6 netmap:zeek{5/xT@1 (tx slots: 1024)
265.461376 main [788] zerocopy enabled

When I run zeek I get the following:
#zeek -i netmap::zeek
fatal error: type of packet source 'netmap' not recognized, or mode not supported.

Can you share your build process and the version of Zeek that you used please?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.