implementing-syslog-centralization-with-rsyslog
它能做什么
这个工具可以帮助你配置 rsyslog 系统,把多台计算机的日志集中收集到一个地方,并且做到安全、有条理。它会生成所需的配置文件,分别用于让各台计算机发送日志,以及让一台中央计算机接收日志。
适用场景
- ✓当你需要把多台服务器的日志汇总到同一个位置时。
- ✓当你希望日志在传输过程中是加密的,从而更加安全时。
- ✓当你需要按计算机或程序类型整理日志时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-syslog-centralization-with-rsyslog/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我配置 rsyslog,让我的服务器日志集中收集,并且加密传输。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会为服务器端和客户端生成配置文件。它使用加密技术保护日志在传输过程中的安全,并按计算机对接收到的文件进行分类整理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Implementing Syslog Centralization with Rsyslog
When to Use
- When deploying or configuring implementing syslog centralization with rsyslog capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
- Install dependencies:
pip install jinja2 paramiko - Generate TLS certificates for rsyslog server and clients using OpenSSL.
- Run the agent to generate rsyslog server and client configurations:
- Server: TLS listener on port 6514, per-host directory output, JSON-format templates
- Client: TLS forwarding with disk-assisted queues for reliability
- Deploy configurations to servers via SSH (paramiko).
- Validate TLS connectivity and log delivery.
python scripts/agent.py --server-ip 10.0.0.1 --clients 10.0.0.10,10.0.0.11 --ca-cert ca.pem --output syslog_report.json
Examples
Server Configuration (TLS)
module(load="imtcp" StreamDriver.Name="gtls" StreamDriver.Mode="1"
StreamDriver.Authmode="x509/name")
input(type="imtcp" port="6514")
template(name="PerHostLog" type="string" string="/var/log/remote/%HOSTNAME%/%PROGRAMNAME%.log")
*.* ?PerHostLog
Client Configuration (Reliable Forwarding)
action(type="omfwd" target="10.0.0.1" port="6514" protocol="tcp"
StreamDriver="gtls" StreamDriverMode="1"
StreamDriverAuthMode="x509/name"
queue.type="LinkedList" queue.filename="fwdRule1"
queue.maxdiskspace="1g" queue.saveonshutdown="on"
action.resumeRetryCount="-1")
常见问题
什么是 rsyslog?
它是一个帮助管理和发送系统日志消息(也就是活动记录)的程序。
什么是日志?
日志是计算机或程序中发生的事件的记录。它们可以帮助你了解发生了什么、排查问题,或者检查安全状况。
为什么要集中管理日志?
把日志集中在一起,你就能在一个地方更方便地分析、监控所有系统,并搜索其中的重要信息。
详情
作者的原始描述
Configure rsyslog for centralized log collection with TLS encryption, custom templates, and log rotation, generating server and client configuration files with GnuTLS stream drivers, x509 certificate authentication, per-host log segregation, and reliable queue settings. Use when building a centralized, encrypted syslog pipeline, hardening rsyslog client/server configs for high-availability log inf
热度
- GitHub 星标
- 35k
- 排名
- #8129
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。