{"library":"python-iptables","title":"python-iptables","description":"Python bindings for iptables, providing a Pythonic interface to manipulate Linux netfilter rules. Currently at v1.2.0, with infrequent releases and limited maintenance.","language":"python","status":"maintenance","last_verified":"Mon Apr 27","install":{"commands":["pip install python-iptables"],"cli":null},"imports":["from iptc import Table"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom iptc import Table, Chain, Rule, Match, Target\n\ntable = Table(Table.FILTER)\nfor chain in table.chains:\n    print(f\"Chain {chain.name}\")\n    for rule in chain.rules:\n        print(f\"  Rule: {rule.src} -> {rule.dst}\")","lang":"python","description":"List all rules in the FILTER table. Run as root.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}