Skip to content

Commit 09a000a

Browse files
author
Matt Fox
committed
Initial commit
0 parents  commit 09a000a

File tree

9 files changed

+5057
-0
lines changed

9 files changed

+5057
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.so
2+
build/

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.1, 12 May 2011 -- Initial release.

LICENSE.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2011, Kerkhoff Technologies, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of the Kerkhoff Technologies, Inc. nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CHANGES.txt
2+
LICENSE.txt
3+
README.txt
4+
netfilterqueue.pyx
5+
setup.py

README.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
==============
2+
NetfilterQueue
3+
==============
4+
5+
NetfilterQueue provides access to packets matched by an iptables rule in
6+
Linux. Packets so matched can be accepted, dropped, altered, or given a mark.
7+
8+
Libnetfilter_queue (the netfilter library, not this module) is part of the `Netfilter project <http://netfilter.org/projects/libnetfilter_queue/>`_.
9+
10+
Example
11+
=======
12+
13+
Coming soon...
14+
15+
Installation
16+
============
17+
18+
NetfilterQueue is a C extention module that links against libnetfilter_queue. Before installing, ensure you have:
19+
20+
1. A C compiler
21+
22+
2. Python development files
23+
24+
3. Libnetfilter_queue development files and associated dependencies
25+
26+
On Debian or Ubuntu, these files are install with::
27+
28+
sudo apt-get install build-essential python-dev libnetfilter-queue-dev
29+
30+
From PyPI
31+
---------
32+
33+
To install from PyPI by pip::
34+
35+
pip install netfilterqueue
36+
37+
From source
38+
-----------
39+
40+
To install from source::
41+
42+
wget http://pypi.python.org/packages/source/n/netfilterqueue/netfilterqueue-0.1.tar.gz
43+
tar -xvzf netfilterqueue-0.1.tar.gz
44+
cd netfilterqueue-0.1
45+
python setup.py install
46+
47+
Setup will use Cython if it is installed, regenerating the .c source from the .pyx before compiling the .so.
48+
49+
Usage
50+
=====
51+
52+
Coming soon...
53+
54+
Now route packets to the queue::
55+
56+
# iptables -I INPUT -p tcp --dport 80 -j NFQUEUE --queue-num 1
57+
58+
The only special part of the rule is the target. Rules can have any match and
59+
can be added to any table or chain.
60+
61+
Valid queue numbers are integers from 0 to 65,536 inclusive.
62+
63+
Limitations
64+
===========
65+
66+
TODO: fix this up
67+
68+
* compiled to max 2048-byte packets, so won't work on LO?
69+
* full API not implemented: omits set_payload(), interface methods, and what else?

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy