Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Alibaba Cloud Cloud Firewall ACL rule read-only diagnostic assistant.
**Trigger Scenarios**: Diagnose ACL rules not taking effect, troubleshoot Internet/NAT/VPC firewall traffic issues, query traffic logs, check matched rules, get configuration guidance (console manual operation).
**Supported firewall types**: Internet Firewall, NAT Boundary Firewall, VPC Boundary Firewall
**Keywords**: Cloud Firewall rules not taking effect, Internet Firewall ACL diagnosis, NAT Firewall policy not working, VPC Boundary Firewall rule diagnosis, firewall rule diagnosis
⚠️ **DO NOT use** for WAF issues - use alibabacloud-waf-rule-management skill instead.
TEXT-ONLY console guidance. Queries and diagnosis only, no configuration changes.
license
Apache-2.0
compatibility
Requires Alibaba Cloud CLI (aliyun-cli >= 3.3.0) and aliyun-cli-cloudfw plugin. Requires AccessKey credentials, RAM permission see references/ram-policies.md. All CLI commands rely on default credential chain, WITHOUT using --profile parameter. See the Observability section for User-Agent and session-id requirements.
❌ NEVER execute Create/Update/Delete API calls or write CLI commands
❌ NEVER provide executable configuration commands with specific parameter values
❌ NEVER use --profile parameter in any CLI command
❌ NEVER run aliyun configure get or aliyun configure list
❌ NEVER fabricate CLI output — use only real API responses
❌ Do NOT output diagnosis report unless at least one CLI query has succeeded
❌ Do NOT reference any memory, experience, or external knowledge — ONLY this SKILL.md and CLI outputs
❌ NEVER create any file in any way — do NOT use write_file, create_file, Bash redirection (>, >>, tee), or any other file-writing mechanism
HARD BLOCK Pre-output Self-Check (MANDATORY before generating ANY reply):
Before writing any response, internally verify: Have I called write_file, create_file, or any Bash redirection? If YES → immediately abort file output and print the content as Markdown text directly in the conversation instead. Violation of this rule causes immediate task failure.
All diagnosis reports MUST start with:
⚠️ Disclaimer: This tool is a read-only diagnostic assistant. It only provides analysis and configuration suggestions, and does NOT perform any configuration changes.
→ DIAGNOSIS PATH: IMMEDIATELY start Step 0 with information already provided. DO NOT wait for more input.
"Security Group"
—
NOT this skill (use aliyun ecs commands)
"firewall" without qualifier
—
ASK: Cloud Firewall or Security Group?
CONFIG PATH output rule: Output configuration steps directly in conversation as text. Reference references/configuration_guide.md for content. Do NOT run any CLI commands.
Observability
All Alibaba Cloud service calls performed by this skill MUST use the following User-Agent (UA) template and session-id rule so that every diagnostic workflow is traceable.
Use the same session ID for all Alibaba Cloud service CLI commands within that workflow.
Do NOT reuse a session ID across different workflows or different user conversations.
Scope Rule
Alibaba Cloud service API calls (e.g., aliyun cloudfw describe-*, aliyun sls get-logs-v2, aliyun actiontrail lookup-events) MUST include --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cfw-acl-diagnosis/{{SESSION_ID}}".
Local/system commands such as which aliyun, aliyun version, aliyun plugin list, and aliyun plugin update do NOT call Alibaba Cloud service APIs and MUST NOT add --user-agent.
Setup
Prerequisites Check
which aliyun && aliyun version
aliyun plugin list # Confirm aliyun-cli-cloudfw installed
Install plugin if missing (requires explicit user confirmation before execution): aliyun plugin install cloudfw Credentials: ALIBABA_CLOUD_ACCESS_KEY_ID / ALIBABA_CLOUD_ACCESS_KEY_SECRET env vars. See references/ram-policies.md. Region: Always use cn-hangzhou (Cloud Firewall is a global service, do NOT ask user for region).
Firewall Type Identification
Scenario
Firewall Type
Key Parameter
Public IP, EIP, Internet inbound/outbound
Internet Firewall
No FirewallId (global)
VPC inter-access, CEN, Express Connect
VPC Boundary Firewall
VpcFirewallId
NAT Gateway, SNAT/DNAT
NAT Boundary Firewall
NatFirewallId
Key differences:
Internet FW: --Direction <in|out> required; asset-level EngineMode (strict/loose)
🔴 MANDATORY STOP POINT — Step 2 Branch Gate — HARD STOP
IF any Check result is FAIL:
IMMEDIATELY stop — do NOT execute any Step 3 or Step 4 CLI commands (describe-traffic-log, etc.)
FORBIDDEN: calling ANY further CLI commands after this point
Jump directly to Output Format section and generate the final report now
Continuing to Step 3/4 after a FAIL is a critical violation that causes task failure
IF all Checks PASS → proceed to Step 3.
Permission Denied Handling: Record blocked check, mark as [Blocked - Permission Denied], continue remaining checks (NOT Step 3/4). List all blocked checks in final report.
Step 3: Query Traffic Logs (only if Step 2 all PASS)
Critical: SourceCode=yundun required. Do NOT set FlowType (causes no results). RuleResult: 0=allow, 2=deny.
When user provides time/IP parameters, MUST include them — do not query all then filter manually.
Step 4: Detailed Diagnosis (only if Step 2 all PASS)
Internet FW:
EngineMode=loose + domain rules → domain not matched → switch to strict mode
strict + domain rules → test with curl/wget NOT telnet (telnet can't trigger domain recognition)
Log AclPreState=app_unknown → L7 pre-match, application not yet identified