py-pf

py-pf is a pure-Python module for managing OpenBSD's Packet Filter. It aims to add powerful and flexible scripting capabilities to PF, making integration with third-party software (like IDS, web-based configuration interfaces or custom management scripts) much easier.

The only prerequisite is Python (2.5 or newer), which is available through OpenBSD's packages and ports system.

1. Installation notes

Once you have downloaded the latest tarball, you just need to perform the following steps to get the module installed:

  • unpack the tarball:
    $ tar -zxvf py-pf-0.0.9.tar.gz
    
  • move to the newly created directory:
    $ cd ./py-pf-0.0.9/
    
  • run the install script (as root) by typing:
    # python setup.py install
    

This will copy the pf module in the third-party modules directory, typically /usr/local/lib/python2.x/site-packages/.

2. Tutorial

A detailed description of the pf module and its classes is available here. For a brief list of references, documentation and books about Python, OpenBSD and Packet Filter, please refer to the resources section.

Valid XHTML 1.0!

Valid CSS!

Designed by kernel-panic.it