本周实战

作业18 · 出站域名白名单草案

8777-8780、116 SSH、钉钉 oapi;两层出站。

作业18 · Agent 工具出站域名白名单草案(规范版)

与 hw18_01_出站域名白名单.py 输出同步;运行脚本可刷新 data/homework18/ 当日版本。


1. Agent OpenAPI 工具(Dify → ssrf_proxy → 207:877x)

域名/IP端口AgentProvider工具风险
192.168.110.2078777运维巡检 Agentserver_statusgetServerStatusL2
192.168.110.2078779vLLM 健康检查 Agentvllm_healthget_vllm_status, get_gpu_info, get_request_queueL2
192.168.110.2078780vLLM 故障自愈 Agentvllm_self_healdetect_vllm_anomaly, restart_vllm_container, send_recovery_notificationL2(含 L1 副作用)

OpenAPI 源文件:


2. 工作流 HTTP(非 Agent OpenAPI,同属 Dify 出站)

域名/IP端口应用路径风险
192.168.110.2078778客服意图路由工作流POST /ticket, GET /healthL2

3. 工具 API 二次出站(207 FastAPI 后端)

域名/IP端口协议触发工具/脚本风险
116.62.10.18322SSH作业5/7 后端L1
116.62.10.1838000HTTPget_request_queue → /metricsL2
oapi.dingtalk.com443HTTPSsend_recovery_notification、作业6 周报L3

4. SSRF 白名单配置建议(Squid / 防火墙)

text
# Allow — Agent tools (source: dify api/worker subnets)
acl agent_tools dstdomain 192.168.110.207
http_access allow agent_tools_ports

# Allow — backend egress from 207 host only (not from dify container directly)
# 116.62.10.183:22  → 源 IP 限制 192.168.110.207
# oapi.dingtalk.com → 443

# Deny
http_access deny all

现网 ssrf_proxy 具体 ACL 以 ssrf_proxy/squid*.conf 为准;本表为审核用草案。


5. 平台依赖(附录 · 非 Agent 工具 HTTP)

域名/IP端口用途
116.62.10.1838000vLLM 推理
192.168.110.2079997Xinference
192.168.110.2073000Langfuse
192.168.110.2074000LiteLLM
192.168.110.2078088Weaviate 中继
marketplace.dify.ai443插件市场(可选)

6. 刷新命令

bash
python scripts_cursor/作业18_Agent出站白名单与密钥轮换/hw18_01_出站域名白名单.py

审核策略:作业18_出站审核与业务策略_cursor.md