{"id":24383072,"url":"https://github.com/akmalovaa/mikroseclist","last_synced_at":"2025-04-19T08:03:39.100Z","repository":{"id":239094547,"uuid":"798496095","full_name":"akmalovaa/mikroseclist","owner":"akmalovaa","description":"Mikrotik CrowdSec firewall address lists sync","archived":false,"fork":false,"pushed_at":"2024-08-11T22:17:11.000Z","size":284,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T10:12:06.443Z","etag":null,"topics":["address","address-list","block","crowdsec","firewall","mikrotik","router-os","routeros","security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akmalovaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-05-09T22:31:47.000Z","updated_at":"2024-12-28T21:49:07.000Z","dependencies_parsed_at":"2024-05-12T07:00:44.831Z","dependency_job_id":null,"html_url":"https://github.com/akmalovaa/mikroseclist","commit_stats":null,"previous_names":["akmalovaa/microseclist"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmalovaa%2Fmikroseclist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmalovaa%2Fmikroseclist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmalovaa%2Fmikroseclist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akmalovaa%2Fmikroseclist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akmalovaa","download_url":"https://codeload.github.com/akmalovaa/mikroseclist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243258505,"owners_count":20262301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["address","address-list","block","crowdsec","firewall","mikrotik","router-os","routeros","security"],"created_at":"2025-01-19T10:12:15.034Z","updated_at":"2025-03-12T17:18:42.185Z","avatar_url":"https://github.com/akmalovaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MikroSecList - Mikrotik Security List\n\n[![crowdsec blocklist](./crowdsec_blocklist/crowdsec_blocklist.png)](https://github.com/akmalovaa/mikroseclist)\n\nRouterOS firewall address list synchronization to CrowdSec Blocklist Mirror \n\n- [DockerHub crowdsec](https://hub.docker.com/r/crowdsecurity/crowdsec)\n- [DockerHub blocklist-mirror](https://hub.docker.com/r/crowdsecurity/blocklist-mirror)\n- [Docs Blocklist mirror](https://docs.crowdsec.net/u/bouncers/blocklist-mirror#installation/)\n\n### Guide \n\nConfigure Blocklist Mirror or use your own list of IP addresses *(need HTTP format output list)*\n\n*`config.yml`*\n```yaml | code\nblocklists:\n  format: plain_text\n```\n\n### Prepare Router OS\n\nCreate certifcates\n```\n/certificate\nadd name=CA-Template common-name=CAtemp key-usage=key-cert-sign,crl-sign\nadd name=Server common-name=server\nadd name=Client common-name=client\n```\n\nCertificates should be signed. \n**Change your RouterOS host address**\n```\n/certificate\nsign CA-Template\nsign Client     \nsign Server ca-crl-host=192.168.88.1 name=ServerCA\n```\n\nEnable API-SSL. **Change api access address**\n```\n/ip service\nset api-ssl address=192.168.88.0/24 certificate=ServerCA\n```\n\n### Docker compose\n\nchange `.env` file variables\n```\ncp .env.exmaple .env\nnano .env\n```\n\nbuild\n```bash\ndocker build . -t mikroseclist:latest\n```\n\nor use github image\n\n```bash\ndocker pull ghcr.io/akmalovaa/mikroseclist:latest\n```\n\nusing docker compose - `compose.yaml`\n\n```yaml\nservices:\n  mikroseclist:\n    image: ghcr.io/akmalovaa/mikroseclist:latest\n    container_name: mikroseclist\n    command: [\"python\", \"-m\", \"mikroseclist\"]\n    environment:\n      MIKROTIK_HOST: ${MIKROTIK_HOST:-'192.168.88.1'}\n      MIKROTIK_USER: ${MIKROTIK_USER:-'admin'}\n      MIKROTIK_PASSWORD: ${MIKROTIK_PASSWORD:-'password'}\n      BLOCKLIST_URL: 'http://blocklist.example.com:41412/security/blocklist?ipv4only'\n      SYNC_INTERVAL_MIN: 30\n    restart: unless-stopped\n```\n\nchange environment variables and run:\n\n```bash\ndocker-compose up -d\n```\n\n[![crowdsec blocklist](./crowdsec_blocklist/mikroseclist_logs.png)](https://github.com/akmalovaa/mikroseclist/blob/main/crowdsec_blocklist/mikroseclist_logs.png)\n\nAfter first syncing сhange Mikrotik Firewall Rules\n```sh\n/ip firewall filter\nadd action=accept chain=input src-address-list=access # access list optional\nadd action=drop chain=input in-interface=ether1 src-address-list=block\nadd action=drop chain=forward in-interface=ether1 src-address-list=block\n```\n\n### Settings\n\nhttps://github.com/akmalovaa/mikroseclist/blob/main/mikroseclist/settings.py\n\nYou can override this variables in the `.env` file\n\n\n## CrowdSec block lists sync\n\nYou can use default **CrowdSec Blocklist mirror** format without `mikroseclist` service:\n\nActual IP addresses will already be in the blocked list\n\n[CrowdSec Blocklist mirror](https://docs.crowdsec.net/u/bouncers/blocklist-mirror/#installation/)\n\nAllows you to use a list of IP addresses to add\n\n*`config.yml`*\n```yaml | code\nblocklists:\n  format: mikrotik\n```\nOutput lines for mikrotik, format is `/ip|/ipv6 firewall address-list add list={list_name} address={ip} comment=\"{scenario} for {duration}\"`\n\nThe list of IP addresses is very large ~ 25,000, when updated in this way, all addresses are deleted and added again. It's pointless to do this every time you update.\n\nThis service `mikroseclist` only allows you to edit changes. Add and delete only new addresses, not the entire list","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmalovaa%2Fmikroseclist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakmalovaa%2Fmikroseclist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakmalovaa%2Fmikroseclist/lists"}