GithubHelp home page GithubHelp logo

ehsantux / npf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rmind/npf

0.0 1.0 0.0 515 KB

NPF -- packet filter with stateful inspection, NAT, IP sets, etc.

License: Other

Makefile 1.65% C 89.67% Roff 5.53% Yacc 2.40% Lex 0.76%

npf's Introduction

NPF: stateful packet filter supporting NAT, IP sets, etc

Build Status

NPF is a layer 3 packet filter, supporting stateful packet inspection, IPv6, NAT, IP sets, extensions and many more. It was designed with a focus on high performance, scalability, multi-threading and modularity. NPF was written from scratch in 2009. It is written in C99 and distributed under the 2-clause BSD license.

Features

NPF offers the traditional set of features provided by packet filters. Some key features are:

  • Stateful inspection (connection tracking).
  • Network address translation (NAT):
    • Static (stateless) and dynamic (stateful) translation.
    • NAPT and other forms of port translation (e.g. port forwarding).
    • Inbound and outbound NAT as well as bi-directional NAT.
    • Network-to-network translation, including NPTv6.
  • Tables for efficient IP sets, including the longest prefix match support.
  • Application Level Gateways (e.g. to support traceroute).
  • NPF uses BPF with just-in-time (JIT) compilation.
  • Rule procedures and a framework for NPF extensions (plugins).
  • Extensions include: traffic normalization and packet logging.
  • Data Plane Development Kit integration.

For a full set of features and their description, see the NPF documentation and other manual pages.

Documentation

http://www.netbsd.org/~rmind/npf/

Dependencies

  • libnv: git clone https://github.com/rmind/nvlist
  • libqsbr: git clone https://github.com/rmind/libqsbr
  • liblpm: git clone https://github.com/rmind/liblpm
  • bpfjit: git clone https://github.com/rmind/bpfjit
  • libcdb: git clone https://github.com/rmind/libcdb

Each repository provides build files for the RPM (cd pkg && make rpm) or DEB (cd pkg && make deb) packages. You can also check the Travis for an example of how to build everything.

Source code structure

src/                - root source code directory
    kern/           - the kernel component (npfkern library)
    libnpf/         - library to manage the NPF configuration
    npfctl/         - command line user interface to control NPF
    npftest/        - unit tests and a tool to debug NPF
dpdk/               - DPDK integration code and a demo
pkg/                - packaging files (RPM and DEB)

Packages

To build the libnpf library (link using the -lnpf and -lnpfkern flags) packages:

  • RPM (tested on RHEL/CentOS 7): cd pkg && make rpm
  • DEB (tested on Debian 9): cd pkg && make deb

npf's People

Contributors

rmind avatar outscale-mgo avatar alexk99 avatar

Watchers

Ehsan Shahrokhi 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.