pynetfilter conntrack是libnetfilter conntrack的python绑定
pynetfilter_conntrack的Python项目详细描述
libnetfilter_conntrack是管理Linux防火墙NetFilter的库。 pynetfilter_conntrack是这个库的Python绑定绑定是 文件pynetfilter_conntrack.py还有一个conntrack程序的克隆: 康特克·皮。
连接路径.py
py是conntrack c程序的克隆。功能:
- List connections ;
- Export connections to XML document ;
- Delete connection.
对于所有命令,可以使用以下命令筛选连接:
- source/destination address from original/reply destination ;
- layer 3 and 4 protocols ;
- source/destination port from original/reply destination (protocols tcp, udp and sctp).
安装
- 以根用户身份运行此命令:
- /setup.py安装
- 或使用sudo程序:
- sudo python setup.py安装
依赖关系
- Linux kernel: 2.6.14+ http://www.kernel.org/
- libnetfilter_conntrack 0.0.75+ (May 2007) http://www.netfilter.org/projects/libnetfilter_conntrack/
- Python 2.3+ http://www.python.org/
- IPy 0.50+ http://software.inl.fr/trac/trac.cgi/wiki/IPy Debian package: python-ipy
- ctypes 1.0+ (only for Python < 2.5) http://starship.python.net/crew/theller/ctypes/ Debian package: python-ctypes
更改日志
版本0.5(2008-09-29)
- New classes for EXPECT manipulation, Expect and ExpectEntry
- Remove Conntrack.destroy_conntrack(), replaced by ConntrackEntry.destroy()
- ConntrackEntry IP (v4 and v6) attributes are now IPy.IP objects
- Remove hashtuple attribute from ConntrackEntry
- BUGFIX: Don’t convert endian (ntohl) when reading entry.status value
- Write cnetfilter_conntrack: Python binding of the libnetfilter_conntrack library written in C
版本0.4.2(2007-10-16)
- Fix ConntrackEntry._getAttr() for Python 2.3
释放0.4.1
- Fix ConntrackEntry.hashtuple for layer3 different than IPv4 and IPV6
- Use correct bitmask with ntohs() in ConntrackEntry._getAttr()
释放0.4
- Rewrite from scratch for new libnetfilter_conntrack
释放0.3.1
- Add debian/ subdirectory for Debian and Ubuntu packaging
释放0.3
- Compliance with ‘pickle’
- Minor enhancements in API
释放0.2
- Python 2.3 compliant
- Use ElementTree (or cElementTree) to generate XML output
- nfct_address: add getIP(), returns a IPy.IP() object
- Fix minor bugs in ConntrackTable.filter()
- setup.py: add requires (used by setuptools)