{"id":24736206,"url":"https://github.com/deseven/clearos-api","last_synced_at":"2026-05-15T20:03:10.395Z","repository":{"id":82698716,"uuid":"407848110","full_name":"deseven/clearos-api","owner":"deseven","description":"API for ClearOS","archived":false,"fork":false,"pushed_at":"2021-09-24T15:57:59.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T18:23:00.198Z","etag":null,"topics":["api","clearos","fastapi","firewall-configuration","python","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deseven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-18T12:00:28.000Z","updated_at":"2022-08-05T09:30:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5e6c8f8-9cd9-47af-8d82-46d4e6605a76","html_url":"https://github.com/deseven/clearos-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deseven/clearos-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deseven%2Fclearos-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deseven%2Fclearos-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deseven%2Fclearos-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deseven%2Fclearos-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deseven","download_url":"https://codeload.github.com/deseven/clearos-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deseven%2Fclearos-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33077943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","clearos","fastapi","firewall-configuration","python","rest-api"],"created_at":"2025-01-27T21:18:11.888Z","updated_at":"2026-05-15T20:03:10.383Z","avatar_url":"https://github.com/deseven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClearOS API\nSince [ClearOS](https://www.clearos.com/) own API in its current state (ClearOS 7.9) is completely useless, I decided to make a 3rd-party one to be able to control at least some parts of configuration with easy to use API. For now only firewall and DHCP modules are supported with the following functionality:\n - get the list of firewall rules (incoming allow, incoming block, outgoing block, port forwarding)\n - add a rule (incoming allow, incoming block, outgoing block, port forwarding)\n - remove a rule (incoming allow, incoming block, outgoing block, port forwarding)\n - get the list of leases\n - add static lease\n - remove static lease\n\nThe API is completely separated from the main system and designed to be as non-intrusive as possible.\n\n## Installation\nFirst of all, install required dependencies:\n```bash\nyum install gcc python3-devel\npip3 install fastapi\npip3 install uvicorn[standard]\n```\n\nThen clone this repo (there are no releases as of now):\n```bash\ncd /opt\ngit clone https://github.com/deseven/clearos-api.git\ncd clearos-api\n```\n\nCopy `config_default.py` as `config.py` to set up api key and header (if needed). Also edit `systemd/clearos-api.service` if you want to change the port and/or binding address (by default it listens on port 1999 on all interfaces).\n\nFinally, add the api to systemd, enable autostart and launch it:\n```bash\ncp systemd/clearos-api.service /etc/systemd/system\nsystemctl daemon-reload\nsystemctl enable clearos-api\nsystemctl start clearos-api\n```\n\n## Usage\nGo to http://your-clearos-installation:1999 and read the docs there.  \nDon't forget to check that the port is opened in ClearOS itself. By the way you can open it from the api on ClearOS host, just perform this simple request (change the api key and port according to your configuration):\n```bash\ncurl http://localhost:1999/firewall/incoming-allow \\\n  -X POST -H 'x-api-key: 1234567asdfgh' -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"clearos-api\",\"proto\":6,\"port\":\"1999\",\"enabled\":true}'\n```\nKeep in mind that there's little to no checks of what you're doing with firewall configuration, don't lock yourself out!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeseven%2Fclearos-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeseven%2Fclearos-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeseven%2Fclearos-api/lists"}