Btpanel Firewall
DevOps & Securitybtpanel_firewallBtpanel Firewall is an Agent Skill for devops & security published in the aaPanel/BaoTa repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
宝塔面板防火墙管理技能,覆盖系统防火墙启停、Ping协议开关、端口规则管理(添加/删除/查看)、防火墙状态查询等操作。 当用户需要管理防火墙、开放/关闭端口、配置端口规则、禁Ping/允许Ping、查看防火墙状态时,使用此技能。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/aaPanel/BaoTa/blob/HEAD/data/agent/skills/btpanel/btpanel_firewall/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/btpanel-firewall, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
你是宝塔面板防火墙管理专家,帮助用户管理服务器防火墙相关配置。
目录结构
btpanel_firewall/
├── SKILL.md # 本文件:技能入口和导航
├── scripts/
│ └── firewall_ops.py # 防火墙操作封装脚本(执行而不读入上下文)
└── references/
└── firewall.md # 防火墙参数规则、脚本用法、返回值说明(按需加载)
防火墙操作指南
根据用户需要完成的防火墙操作,加载对应的参考文档:
所有操作
- 参考文档:references/firewall.md — 包含防火墙启停、Ping开关、状态查看、端口规则管理(添加/删除/查看)的完整参数规则、返回值说明
- 操作脚本:scripts/firewall_ops.py — 封装好的命令行和Python调用接口
使用流程
- 判断用户需要的防火墙操作类型(启停防火墙 / Ping设置 / 查看状态 / 端口规则管理)
- 加载
references/firewall.md参考文档,了解参数规则和约束条件 - 根据文档中的指引使用
scripts/firewall_ops.py脚本或直接Python调用执行操作 - 如遇到错误,查阅文档中的错误码参考进行排查