Coder Social home page Coder Social logo

opti's Introduction

==================
iptables-optimizer
==================

Optimize kernel's iptables ruleset by usage.

Author:     Johannes Hubertz <[email protected]>

Date:       2015-02-10

Version:    0.9.13

License:    GNU General Public License version 3 or later

Benefit:    Less interrupt load in a statistical point of
            view by minimizing latencies for any 
            IPv4 or IPv6 packets slowed down by very long 
            ip(6)tables chains.

Costs:      Small amount of additional user space workload.

ip6tables-optimizer behaves like iptables-optimizer, except
it uses ip6tables commands instead of iptables commands.

The ip(6)tables-optimizer is intended to sort the chains in
the running Linux-kernel, goal is to reduce latency of
traversing packets. It runs as a shell script, which calls a
python script. This sorts the chains by decreasing values
of packet counters, afterwards the result is restored into
the kernel.
Of course, the administrators artwork in designing the
rules is untouched, especially the presence of user defined
chains, reject- or drop-rules is never changed. The only
target are sequences of accept-rules, which are called
partitions inside the script. Within these, there the
rules are sorted. So it should be a challenge for the
administrator to create his rules using as few policy-
changes as possible within his ruleset to have a maximum
benefit of the optimizer-script.

Using shunit2 tests insure the wrapper part is as reliable
as the python part of the ip(6)tables-optimizer. 
ip(6)tables-optimizer evaluates some line arguments:
-a do not look for /var/cache/iptables-optimizer/auto-apply
-c do not reset packet/byte counters on restoring tables
-h to give this list of valid options
-v add logging, twice shows partition tables in logs
-w shows partition tables for INPUT and OUTPUT only

Starting up the existance of an executable file is checked.

/var/cache/iptables-optimizer/{auto-apply,auto-apply6}

It is fed into the kernel by running ip(6)tables-restore
and afterwards renamed following a simple date-time strategy.
Thats my way of firing new rules into the kernel.

Ideas, suggestions, comments welcome.

Thanks for reading.
Have fun!

Johannes

opti's People

Contributors

sl0 avatar

Watchers

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