Skip to content

Commit 8957048

Browse files
authored
Merge pull request #215 from ldx/vilmos-doc-rst-md-sync
Update RST docs
2 parents 47946d1 + a0c9efe commit 8957048

File tree

3 files changed

+51
-26
lines changed

3 files changed

+51
-26
lines changed

README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ If you are looking for `ebtables` python bindings, check out
3636

3737
[![Latest Release](https://pypip.in/v/python-iptables/badge.png)](https://pypi.python.org/pypi/python-iptables)
3838

39-
[![Build Status](https://travis-ci.org/ldx/python-iptables.png?branch=master)](https://travis-ci.org/ldx/python-iptables) [![Coverage Status](https://coveralls.io/repos/ldx/python-iptables/badge.svg?branch=codecoverage)](https://coveralls.io/r/ldx/python-iptables?branch=codecoverage) [![Code Health](https://landscape.io/github/ldx/python-iptables/codecoverage/landscape.svg)](https://landscape.io/github/ldx/python-iptables/codecoverage)
39+
[![Build Status](https://travis-ci.org/ldx/python-iptables.png?branch=master)](https://travis-ci.org/ldx/python-iptables)
40+
41+
[![Coverage Status](https://coveralls.io/repos/ldx/python-iptables/badge.svg?branch=codecoverage)](https://coveralls.io/r/ldx/python-iptables?branch=codecoverage)
42+
43+
[![Code Health](https://landscape.io/github/ldx/python-iptables/codecoverage/landscape.svg)](https://landscape.io/github/ldx/python-iptables/codecoverage)
4044

4145
[![Number of Downloads](https://pypip.in/d/python-iptables/badge.png)](https://pypi.python.org/pypi/python-iptables)
4246

@@ -77,6 +81,10 @@ installs into `/usr/local/lib`.
7781
Now you can run the tests:
7882

7983
% sudo PATH=$PATH python setup.py test
84+
WARNING: this test will manipulate iptables rules.
85+
Don't do this on a production machine.
86+
Would you like to continue? y/n y
87+
[...]
8088

8189
The `PATH=$PATH` part is necessary after `sudo` if you have installed
8290
into a `virtualenv`, since `sudo` will reset your environment to a
@@ -279,17 +287,17 @@ in/out inteface etc is. To print out all rules in the FILTER table:
279287
As you see in the code snippet above, rules are organized into chains,
280288
and chains are in tables. You have a fixed set of tables; for IPv4:
281289

282-
* FILTER,
283-
* NAT,
284-
* MANGLE and
285-
* RAW.
290+
- `FILTER`,
291+
- `NAT`,
292+
- `MANGLE` and
293+
- `RAW`.
286294

287295
For IPv6 the tables are:
288296

289-
* FILTER,
290-
* MANGLE,
291-
* RAW and
292-
* SECURITY.
297+
- `FILTER`,
298+
- `MANGLE`,
299+
- `RAW` and
300+
- `SECURITY`.
293301

294302
To access a table:
295303

@@ -538,17 +546,16 @@ or more rules, than commit it:
538546
The drawback is that Table is a singleton, and if you disable
539547
autocommit, it will be disabled for all instances of that Table.
540548

541-
542549
Known Issues
543550
============
544551

545552
These issues are mainly caused by complex interaction with upstream's
546553
Netfilter implementation, and will require quite significant effort to
547554
fix. Workarounds are available.
548555

549-
* [Issue #201](https://github.com/ldx/python-iptables/issues/201)
550-
-- The `hashlimit` match requires explicitly setting `hashlimit_htable_expire`
551-
552-
* [Issue #204](https://github.com/ldx/python-iptables/issues/204)
553-
-- The `NOTRACK` target is problematic; use `CT --notrack` instead
556+
- The `hashlimit` match requires explicitly setting
557+
`hashlimit_htable_expire`. See [Issue
558+
\#201](https://github.com/ldx/python-iptables/issues/201).
559+
- The `NOTRACK` target is problematic; use `CT --notrack` instead. See
560+
[Issue \#204](https://github.com/ldx/python-iptables/issues/204).
554561

doc/examples.rst

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,19 @@ in/out inteface etc is. To print out all rules in the FILTER table::
153153
>>> print "======================="
154154

155155
As you see in the code snippet above, rules are organized into chains, and
156-
chains are in tables. You have a fixed set of tables; for IPv4::
156+
chains are in tables. You have a fixed set of tables; for IPv4:
157157

158-
* FILTER,
159-
* NAT,
160-
* MANGLE and
161-
* RAW.
158+
* ``FILTER``,
159+
* ``NAT``,
160+
* ``MANGLE`` and
161+
* ``RAW``.
162162

163-
For IPv6 the tables are::
163+
For IPv6 the tables are:
164164

165-
* FILTER,
166-
* MANGLE,
167-
* RAW and
168-
* SECURITY.
165+
* ``FILTER``,
166+
* ``MANGLE``,
167+
* ``RAW`` and
168+
* ``SECURITY``.
169169

170170
To access a table::
171171

@@ -409,3 +409,13 @@ commit it::
409409

410410
The drawback is that `Table` is a singleton, and if you disable autocommit, it
411411
will be disabled for all instances of that `Table`.
412+
413+
Known Issues
414+
============
415+
416+
These issues are mainly caused by complex interaction with upstream's
417+
Netfilter implementation, and will require quite significant effort to
418+
fix. Workarounds are available.
419+
420+
- The ``hashlimit`` match requires explicitly setting ``hashlimit_htable_expire``. See `Issue #201 <https://github.com/ldx/python-iptables/issues/201>`_.
421+
- The ``NOTRACK`` target is problematic; use ``CT --notrack`` instead. See `Issue #204 <https://github.com/ldx/python-iptables/issues/204>`_.

doc/intro.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ If you are looking for ``ebtables`` python bindings, check out
4444
:target: https://travis-ci.org/ldx/python-iptables
4545
:alt: Build Status
4646

47+
.. image:: https://coveralls.io/repos/ldx/python-iptables/badge.svg?branch=codecoverage
48+
:target: https://coveralls.io/r/ldx/python-iptables?branch=codecoverage
49+
:alt: Coverage Status
50+
51+
.. image:: https://landscape.io/github/ldx/python-iptables/codecoverage/landscape.svg
52+
:target: https://landscape.io/github/ldx/python-iptables/codecoverage
53+
:alt: Code Health
54+
4755
.. image:: https://pypip.in/d/python-iptables/badge.png
4856
:target: https://pypi.python.org/pypi/python-iptables
4957
:alt: Number of Downloads
@@ -85,7 +93,7 @@ installs into ``/usr/local/lib``.
8593

8694
Now you can run the tests::
8795

88-
% sudo PATH=$PATH ./test.py
96+
% sudo PATH=$PATH python setup.py test
8997
WARNING: this test will manipulate iptables rules.
9098
Don't do this on a production machine.
9199
Would you like to continue? y/n y

0 commit comments

Comments
 (0)