Giter Site home page Giter Site logo

vyt-libnetfilter-cthelper's Introduction

= nfnl_cthelper: User-space infrastructure for connection tracking helpers =

Author: Pablo Neira Ayuso <[email protected]>

== Introduction ==

Connection tracking helpers allows you to filter multi-flow protocols
that usually separate control and data traffic into different flows.
This is the case of application protocols like FTP, SIP and H.323 that
are already supported by Netfilter. These helpers are implemented in
kernel-space.

There are good reasons to implement helpers in user-space instead:

* Rapid connection tracking helper development, as developing code
  in user-space is usually faster.

* Reliability: A buggy helper does not crash the kernel. Moreover,
  we can monitor the helper process and restart it in case of problems.

* Security: Avoid complex string matching and mangling in kernel-space
  running in unprivileged mode. Going further, we can even think about
  running user-space helpers as a non-root process.

* It allows the development of very specific helpers (most likely
  non-standard proprietary protocols) that are very likely to be rejected
  for mainline inclusion in the form of kernel-space connection tracking
  helpers.

== Basic operation ==

In a few steps:

1) Register user-space helper

# ./nfct-helper-add test 0

This adds a helper `test' that uses the queue number 0.

2) Add rules to enable the `test' user-space helper

For locally generated packets:
# iptables -I OUTPUT -t raw -p tcp -j CT --helper test

For non-locally generated packets:
# iptables -I PREROUTING -t raw -p tcp -j CT --helper test

3) Run the test libnetfilter_queue program

# ./nfqnl_test

4) Generate traffic, if everything is OK, then `nfqnl_test' program
   displays lines like this:

 pkt received
 hw_protocol=0x0800 hook=4 id=4 outdev=3 payload_len=60
 entering callback
 [...]

This means that the cthelper infrastructure is passing traffic to
user-space.

vyt-libnetfilter-cthelper's People

Contributors

ummakynes avatar

Watchers

James Cloos avatar  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.