{"id":13844856,"url":"https://github.com/jagerzhang/CCKiller","last_synced_at":"2025-07-12T00:32:00.054Z","repository":{"id":41254651,"uuid":"50088322","full_name":"jagerzhang/CCKiller","owner":"jagerzhang","description":"Linux轻量级CC攻击防御工具脚本","archived":false,"fork":false,"pushed_at":"2019-10-06T02:47:49.000Z","size":38,"stargazers_count":294,"open_issues_count":5,"forks_count":123,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-05T17:43:08.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zhang.ge/5066.html","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jagerzhang.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}},"created_at":"2016-01-21T06:52:32.000Z","updated_at":"2024-07-30T20:40:45.000Z","dependencies_parsed_at":"2022-08-02T11:53:14.987Z","dependency_job_id":null,"html_url":"https://github.com/jagerzhang/CCKiller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagerzhang%2FCCKiller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagerzhang%2FCCKiller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagerzhang%2FCCKiller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jagerzhang%2FCCKiller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jagerzhang","download_url":"https://codeload.github.com/jagerzhang/CCKiller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225772782,"owners_count":17521888,"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":[],"created_at":"2024-08-04T17:02:59.738Z","updated_at":"2025-07-12T00:32:00.041Z","avatar_url":"https://github.com/jagerzhang.png","language":"Shell","funding_links":[],"categories":["Shell","Shell (473)"],"sub_categories":[],"readme":"# CCkiller\nLinux attack defense scripts tool --- Linux CC攻击防御工具脚本\n\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fjagerzhang%2FCCKiller\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=Views\u0026edge_flat=false)](https://hits.seeyoufarm.com)\n\n1. 请执行如下命令在线安装：\n\n```\ncurl -ko install.sh https://zhang.ge/wp-content/uploads/files/cckiller/install.sh?ver=1.0.8 \u0026\u0026 sh install.sh -i\n```\n\n2015-09-23 Ver 1.0.1：\n\n- 支持白名单为IP段，格式为IP段通用格式，比如 192.168.1.0/24；\n- 新增拉黑改为判断 iptables 是否已存在操作IP的判断方式；\n- 增加日志记录功能，每天一个日志文件，位于安装目录下的log文件内；\n- 集成手动拉黑IP和解封IP功能，使用cckiller -b IP 拉黑，使用 cckiller -u IP 解封。\n\n2015-11-29 Ver 1.0.2：\n\n- 新增在线更新功能，执行 ./install.sh -u 即可检测是否有新版本：CCKiller：Linux轻量级CC攻击防御工具，秒级检查、自动拉黑和释放\n- 如果发现有新版本则显示更新内容，并提示是否执行更新。选择之后将会更新到新版本，需要重新配置，但是IP或端口白名单会保持不变。\n- 新增端口白名单功能\n- 应网友需求，新增了这个端口白名单功能。在配置CCKiller的最后一项会提示输入端口白名单\n\n如果需要排除某些端口，请如图最后一行所示，输入端口并已逗号分隔，比如 21,2121,8000\n本次更新为非必须功能，在用的朋友可以按需更新，当然新增了在线更新这个功能，也强力推荐更新一下，方便后续检测CCKiller是否是最新版本。\n更新难免存在不可意料的纰漏，使用中存在任何问题请留言告知，谢谢！\n\n2016-06-20 Ver 1.0.3：\n\n- 增加“永久”拉黑时长\n- 有网友反馈，需要设置更长的拉黑时间。原先的机制来看，如果设置拉黑时间过长，那么可能会产生很多后台释放黑名单脚本，占用系统资源。\n- 因此，1.0.3版本加入永久拉黑设置。只要在安装的时候，设置拉黑时长为0，则CCKiller不会再产生后台释放脚本，也不会释放已拉黑的IP了\n\n但是，考虑到灵活性问题，并没有在新版中加入 service iptables save 的保存命令，所以当你重启系统或者重启iptables，这些拉黑的IP都将得到释放。当然，如果你真的想永久拉黑，请手动执行 service iptables save 即可。\n注册开机启动\n新版本已将CCKiller服务注册到了开机启动服务列表，重启系统不用在担心未启动CCKiller了。\n兼容 Centos 7\n目前博客运行在Centos 7 系统，所以将CCKiller也做了一下兼容，其实就是在Centos 7上安装了iptables。并且修复了Centos7系统对已拉黑IP的判断问题。\nPs：以上功能如果你觉得有用，可以执行 install.sh -u 进行在线更新，记得是小写u哦。\n\n2016-10-09 Ver 1.0.4：\n\n- BUG修复\n根据网友反馈，发现攻防测试中一个IP不能被拉黑，经过分析发现命中了白名单。而实际上白名单中并没有IP段，只因IP同属于一个网段。因此，在是否属于IP段的判断中，加入对斜杠的筛选，也就是说只判断白名单中存在斜杠(/)的条目，简单粗暴！\n\n2017-05-20 Ver 1.07 (中间漏记了2个小版本，也不记得修复了啥)\n\n- 日志级别、开关\n\n根据网友建议，新增日志控制开关，参数为LOG_LEVEL，支持 INFO、DEBUG和OFF 3个参数，其中INFO表示仅记录拉黑和释放IP，DEBUG记录全部日志，包括拉黑、释放的报错信息，OFF表示关闭日志。\n如果需要使用该功能，可以执行 ./install.sh -u 在线更新或直接重新安装。\n\n2019-07-11 Ver 1.0.8\n- 支持IPv6检查;\n- 优化在线安装脚本，减少下载失败几率；\n- 基于/proc/net检查，替换netstat，避免在高并发时netstat导致CPU高负载的问题，感谢Late Winter指出，检查代码来自DDoS-Defender-v2.1.0。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagerzhang%2FCCKiller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjagerzhang%2FCCKiller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagerzhang%2FCCKiller/lists"}