{ "info": { "author": "Vladislav Yarmak", "author_email": "vladislav@vm-0.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: No Input/Output (Daemon)", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Security", "Topic :: System :: Networking :: Firewalls", "Topic :: Utilities" ], "description": "pyknock\n=======\n\nUDP port knocking suite with HMAC-PSK authentication. Once it receives valid packet signed with valid pre-shared key, it runs command to open or close access. Commands should be specified by user via server command line. Server allows use of substitution placeholders in configured commands:\n\n* `$ip` - IP address mentioned in signed packet\n* `$af` - IP address type: `inet` or `inet6`\n* `$cmd` - requested action: `open` or `close`\n\nSee Usage for examples.\n\n## Main Idea\n\nIn this application UDP datagrams are choosen for a reason. Typical configuration of firewalled machine allows only packets to some public ports and drops packets to all other ports. With UDP external observer can't distinguish between accepted packet and packet dropped by firewall. Therefore, if firewall configuration drops all UDP packets except packets to pyknock port, external observer can't even detect there is something awaiting for magic packet. So, it may be used to hide machine completely from network for unauthenticated peers. Also, it may be used as classical port-knocking solution, adding another protection layer to sensitive network application.\n\n## Features\n\n* Uses cryptographically authenticated messages.\n* Resistant to replay attacks.\n* Post-quantum ready cryptography (HMAC-PSK with SHA-256).\n* Works completely in user-space. May run even as unprivileged user.\n\n## Requirements\n\nOnly Python 2.6+ required. Python 3 is also supported.\n\n## Installation\n\nPlace file anywhere you want and run. Or use `pip install pyknock` to install it as python package into your system. Scripts shall become available at standard binary paths.\n\n## Usage\n\nServer example:\n\n```bash\npyknock-server MySecretPSK 'ipset add -exist myallowedset $ip timeout 3600' 'ipset del -exist myallowedset $ip'\n```\n\nClient example:\n\n```bash\npyknock-client open my-protected-host.com MySecretPSK\n```\n\nClient behind NAT example:\n\n```bash\npyknock-client -S $(curl -s https://canihazip.com/s) open my-protected-host.com MySecretPSK\n```\n\nSee help for more options.\n\n\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/Snawoot/pyknock", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyknock", "package_url": "https://pypi.org/project/pyknock/", "platform": "", "project_url": "https://pypi.org/project/pyknock/", "project_urls": { "Homepage": "https://github.com/Snawoot/pyknock" }, "release_url": "https://pypi.org/project/pyknock/0.4.2/", "requires_dist": null, "requires_python": ">=2.6", "summary": "UDP port knocking suite with HMAC-PSK authentication", "version": "0.4.2" }, "last_serial": 4400695, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "5538417612dd055e63fcc749e5380d3c", "sha256": "36bdf4ad018e3234d4c9e4091a31acfa33ed9d60206ba750f4a1877c4d8e8229" }, "downloads": -1, "filename": "pyknock-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5538417612dd055e63fcc749e5380d3c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6", "size": 5741, "upload_time": "2018-10-21T21:53:52", "url": "https://files.pythonhosted.org/packages/c3/82/d8c0ba2e1c0a0e1d027534a64e8f92f7d454a78e17bfe3b5f169337f6498/pyknock-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6581c34bfb901f43570f8eb0e836dd52", "sha256": "557f9bec6ac23ef8386ef51181e75bdd0758a1faddf909c4e4f603d40b0dc17a" }, "downloads": -1, "filename": "pyknock-0.4.1.tar.gz", "has_sig": false, "md5_digest": "6581c34bfb901f43570f8eb0e836dd52", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6", "size": 3816, "upload_time": "2018-10-21T21:53:54", "url": "https://files.pythonhosted.org/packages/d3/0c/8811cad706598bbc55aa5656b30d692ea6240497f43cd526bae223635588/pyknock-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "76fb94b1031915ccb925c2aba32d92de", "sha256": "aa7b6178969734d957561b4aaf217806ef12e46dc0e69541c0e7ec21dd64d926" }, "downloads": -1, "filename": "pyknock-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "76fb94b1031915ccb925c2aba32d92de", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6", "size": 6442, "upload_time": "2018-10-21T22:47:00", "url": "https://files.pythonhosted.org/packages/9d/a0/8a88217c676fdf17866919c0978f156fe63dd5981c36e35a761c3e155ea8/pyknock-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c26f3645deabee637ee4674c74d0022", "sha256": "fe3f5f7e478bf775eee8c0a50609c5a8827f0708dff52c0bd2f410f98a985075" }, "downloads": -1, "filename": "pyknock-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7c26f3645deabee637ee4674c74d0022", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6", "size": 4534, "upload_time": "2018-10-21T22:47:02", "url": "https://files.pythonhosted.org/packages/09/f5/482f62f35e5ad4a34fdbe155e56db50419952dee7c190449c736ed92647a/pyknock-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "76fb94b1031915ccb925c2aba32d92de", "sha256": "aa7b6178969734d957561b4aaf217806ef12e46dc0e69541c0e7ec21dd64d926" }, "downloads": -1, "filename": "pyknock-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "76fb94b1031915ccb925c2aba32d92de", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6", "size": 6442, "upload_time": "2018-10-21T22:47:00", "url": "https://files.pythonhosted.org/packages/9d/a0/8a88217c676fdf17866919c0978f156fe63dd5981c36e35a761c3e155ea8/pyknock-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c26f3645deabee637ee4674c74d0022", "sha256": "fe3f5f7e478bf775eee8c0a50609c5a8827f0708dff52c0bd2f410f98a985075" }, "downloads": -1, "filename": "pyknock-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7c26f3645deabee637ee4674c74d0022", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6", "size": 4534, "upload_time": "2018-10-21T22:47:02", "url": "https://files.pythonhosted.org/packages/09/f5/482f62f35e5ad4a34fdbe155e56db50419952dee7c190449c736ed92647a/pyknock-0.4.2.tar.gz" } ] }