{ "info": { "author": "Roberto Aguilar", "author_email": "roberto.c.aguilar@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# simple tables\nA simple interface to managing iptables on linux\n\nThe hardest part of managing iptables is that they are a central piece of data that's constantly changing from many different directions. Because its state isn't guaranteed, making a simple modification to it can have undesired consequences. This project aims to solve this problem by making yet another interface to iptables.\n\nThis interface aims to be declarative. Rather than looking at issuing changes directly to iptables, this package defines the desired state. The significance is that it matters less what the tables look like at any given time and instead the goal is to end up with what it should look like.\n\nAdditionally, because it's unknown what changes other systems have made, any tables and rules that have not been declared are left untouched.\n\n\n## Example\n\n```\nimport iptables\n\nplan = iptables.Plan()\n\n# this will delete an existing table and create it from scratch\nberto_chain = plan.add_chain('OPENVPN_BERTO')\n\n# rules are added with a default priority of 50\nberto_chain.add_rule(iptables.Rule('-o tun0 -s 192.168.2.2 -d 192.168.1.1 -j ACCEPT'))\n\n# this will get an existing table and create it if it does not exist\nopenvpn_chain = plan.get_chain('OPENVPN')\n\n# rules with higher number priority get added to the chain first\n# when updating an existing chain, rules already in the chain get a priority of 70.\n# being added is compared to existing rules and will be added if missing or left alone.\nopenvpn_chain.add_rule(iptables.Rule('-o ! tun0 -j RETURN', priority=100))\nopenvpn_chain.add_rule(berto_chain.jump)\n\n# make necessary changes to achieve the desired outcome\nplan_execute()\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rca/declarative-iptables", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "declarative-iptables", "package_url": "https://pypi.org/project/declarative-iptables/", "platform": "", "project_url": "https://pypi.org/project/declarative-iptables/", "project_urls": { "Homepage": "https://github.com/rca/declarative-iptables" }, "release_url": "https://pypi.org/project/declarative-iptables/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "work with iptables in a declarative manner", "version": "0.1.0" }, "last_serial": 4351909, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e317b573beeb5bb1c1b500f0630ea124", "sha256": "84faedb9900e43f86bb352f37ac9ab46fd87beadae7fcbc5cfc43cc82a63a94b" }, "downloads": -1, "filename": "declarative-iptables-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e317b573beeb5bb1c1b500f0630ea124", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4858, "upload_time": "2018-10-08T12:50:32", "url": "https://files.pythonhosted.org/packages/39/65/8c96c0ff08e2c18b9a46a6e6160b37476fd6ac7d5d834653b5717155b745/declarative-iptables-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e317b573beeb5bb1c1b500f0630ea124", "sha256": "84faedb9900e43f86bb352f37ac9ab46fd87beadae7fcbc5cfc43cc82a63a94b" }, "downloads": -1, "filename": "declarative-iptables-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e317b573beeb5bb1c1b500f0630ea124", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4858, "upload_time": "2018-10-08T12:50:32", "url": "https://files.pythonhosted.org/packages/39/65/8c96c0ff08e2c18b9a46a6e6160b37476fd6ac7d5d834653b5717155b745/declarative-iptables-0.1.0.tar.gz" } ] }