Code Monkey home page Code Monkey logo

mhwh-dev / dpdk-suricata_3.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vipinpv85/dpdk-suricata_3.0

0.0 0.0 0.0 108.08 MB

add dpdk interface and packet processing to suricata in worker mode

Home Page: https://github.com/vipinpv85/DPDK-Suricata_3.0

License: GNU Lesser General Public License v3.0

Shell 7.37% C++ 6.59% Python 0.12% Perl 0.28% C 73.19% PHP 0.04% Objective-C 0.06% Cuda 0.02% Makefile 4.30% M4 0.69% Roff 7.32% SmPL 0.03% Raku 0.01%

dpdk-suricata_3.0's Introduction

Long Term Support

End of Life (no more new supprot addition & features)

Purpose

Make use of DPDK PMD, with pre-parser and 3 Tuple ACL before Suricata worker stage. This helps to send only relevan ipv4 and ipv6 to Suricata worker pipeline.

How to build

Build Enviroment

software release
gcc Ubuntu 7.3.0-27ubuntu1~18.04
OS 4.15.0-46-generic debian version Ubuntu 18.04.2 LTS

DPDK

  1. Download DPDK LTS http://fast.dpdk.org/rel/dpdk-18.11.5.tar.xz from dpdk.org.

  2. Untar DPDK and use make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc.

  3. Build DPDK by

export RTE_SDK=$PWD; 
export RTE_TARGET=x86_64-native-linuxapp-gcc; 
cd x86_64-native-linuxapp-gcc, 
make -j 4
  1. Test the custom build by cross checking examples like helloworld & l2fwd.

Suricata with DPDK

  1. Download the project zip and unzip the contents.

  2. Execute in terminal

 - cd DPDK-Suircata_3.0/suricata-3.0
 - autoconf
  1. If DPDK enviroment variables are present, use
 - ./configure --enable-dpdkintel
 or
 - ./configure --sysconfdir=<mydesiredpath> --enable-dpdkintel
  1. If DPDK is installed as package or custom build directory, use
 - ./configure --enable-dpdkintel --with-libdpdkintel-includes=<path to dpdk include> --with-libdpdkintel-libraries=<path to dpdk lib>
 or
 - ./configure --sysconfdir=<mydesiredpath> --enable-dpdkintel --with-libdpdkintel-includes=<path to dpdk include> --with-libdpdkintel-libraries=<path to dpdk lib>
  1. Build suricata with
make -j 10

modified suricata:

steps explanation
autoconf to build the configure script with DPDK support
./configure --enable-dpdk makes configuration and build Makefile with DPDK support
make -j 10 build suricata with 10 threads

Test Run:

command purpose
./src/suricata --list-runmodes get suricata version and supported modes
./src/suricata --list-dpdkintel-ports list DPDK available ports
./src/suricata -c suricata.yaml --dpdkintel Run DPDK suircata with mysuricata.cfg

Configuration for suricata.yaml

  1. IDS
#dpdkintel support
dpdkintel:

  inputs:
     - interface: 0
     - interface: 1

# Select dpdk intel operation mode ips|ids|bypass
       opmode: ids
  1. IPS
#dpdkintel support
dpdkintel:

  inputs:
     - interface: 0
       copy-interface: 1
     - interface: 1
       copy-interface: 0

# Select dpdk intel operation mode ips|ids|bypass
       opmode: ips

Configuration for dpdk-suricata.ini

Section purpose
EAL dpdk eal args
PORT-[0-X] specific configuration per port
ACL-IPV4 rule count or number of entires
ACL-IPV6 rule count or number of entires

dpdk-suricata_3.0's People

Contributors

megha-ajmera avatar vipinpv85 avatar vvarghes avatar

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.