技能 hybrid-cloud-networking
🌐

hybrid-cloud-networking

安全 ⚙️ 外部命令🌐 网络访问

通过 VPN 和 Direct Connect 连接本地数据中心与云端

也可从以下获取: wshobson

设计并实施安全的混合云网络,将您的数据中心连接到 AWS、Azure 和 GCP。此技能提供经过验证的架构模式、基础设施即代码模板以及生产级连接的最佳实践。

支持: Claude Codex Code(CC)
🥉 75 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“hybrid-cloud-networking”。 生成 AWS 站点到站点 VPN 的 Terraform 配置

预期结果:

我将为 AWS 站点到站点 VPN 连接创建 Terraform 配置。这将包括虚拟私有网关、客户网关和 VPN 连接资源。

配置将包括:
- 附加到您的 VPC 的 VPN 网关
- 具有您的本地 IP 和 BGP ASN 的客户网关
- 具有 IPSec 隧道的 VPN 连接
- 路由传播设置

应用后,您需要使用 AWS 提供的 VPN 设备配置来配置您的本地路由器。

正在使用“hybrid-cloud-networking”。 解释混合网络的 BGP 路由传播

预期结果:

BGP 路由传播在您的本地网络和云 VPC/VNet 之间实现动态路由。工作原理如下:

1. **BGP 对等**:您的本地路由器(ASN 65000)与云路由器建立 BGP 会话(AWS:64512,Azure:65515)

2. **路由通告**:双方通告其 CIDR 块 - 您通告 10.0.0.0/8,云通告 VPC 范围如 172.31.0.0/16

3. **自动更新**:添加新子网时,路由会自动传播,无需手动更新路由表

4. **故障转移**:如果主隧道故障,BGP 会自动通过备用隧道重新路由流量

我建议在混合网络中使用 BGP 而非静态路由,以获得更好的弹性。

安全审计

安全
v1 • 2/25/2026

Static analysis detected 54 patterns including shell command references (backticks) and network reconnaissance terms. All findings are FALSE POSITIVES: backticks appear in Terraform HCL code blocks as documentation examples, not executable Ruby code. Network reconnaissance terms refer to legitimate cloud infrastructure monitoring commands (aws ec2 describe-vpn-connections). The skill provides educational documentation and Infrastructure as Code templates for hybrid cloud networking - no executable code, no data exfiltration, and no malicious intent detected.

1
已扫描文件
241
分析行数
6
发现项
1
审计总数
低风险问题 (4)
Terraform HCL Code Blocks Falsely Flagged as Ruby Execution
Static analyzer detected backtick characters (line 22, 46-66, 74-96, 96-119, 129-132, 138-141, 151-159, 159-183, 183-195, 195-213, 213-221, 221-234, 234-235, 235-239) and interpreted them as Ruby shell backtick execution. In reality, these are Terraform HCL code blocks marked with triple backticks (```) for syntax highlighting in documentation. The skill file is Markdown documentation, not executable Ruby code. No command execution risk exists.
Legitimate IP Addresses in Terraform Examples
Static analyzer flagged hardcoded IP addresses at lines 56 and 154 as 'network' risk. These are example documentation IP addresses (203.0.113.1 and 10.0.0.0/8) in Terraform HCL configuration blocks. 203.0.113.0/24 is the RFC 5737 documentation IP range specifically reserved for examples. 10.0.0.0/8 is RFC 1918 private IP space. Both are standard, safe, and not malicious.
C2 Keywords False Positive - Cloud Service Terminology
Static analyzer flagged 'C2 keywords' at lines 215-216. These are AWS CLI commands (aws ec2 describe-vpn-connections, get-vpn-connection-telemetry) for monitoring VPN connections in a troubleshooting section. 'C2' in this context refers to 'Customer to Cloud' connectivity in networking terminology, not 'Command and Control' malware infrastructure. These are standard AWS CLI troubleshooting commands.
Reconnaissance Terms in Documentation Context
Static analyzer detected 24 'system reconnaissance' and 'network reconnaissance' patterns across the file. All appear in legitimate context: 'monitor connections', 'describe-vpn-connections', 'troubleshooting', 'configure routing', 'advertise routes', etc. These are standard cloud infrastructure operations (monitoring, routing, troubleshooting) documented for educational purposes. No port scanning, vulnerability scanning, or malicious reconnaissance activity present.
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
97
安全
100
规范符合性

你能构建什么

企业数据中心扩展

使用站点到站点 VPN 将您的本地数据中心连接到云 VPC 进行初始迁移,然后升级到 Direct Connect 以满足需要低延迟和高带宽的生产工作负载。

多区域混合架构

设计跨越您的数据中心和多个云区域的主动 - 主动混合部署,实施 BGP 路由和故障转移以实现灾难恢复场景。

合规混合云设置

通过实施加密 VPN 隧道、通过 Direct Connect/ExpressRoute 的私有连接以及使用 CloudWatch 和 Azure Monitor 的全面监控,构建符合监管合规要求的混合网络。

试试这些提示

基本 AWS VPN 连接
帮助我在本地数据中心(客户网关 IP:203.0.113.1,BGP ASN:65000)和 AWS VPC(vpc-id:vpc-12345)之间设置站点到站点 VPN 连接。生成 Terraform 配置。
高可用性混合网络
设计一个高可用性混合网络架构,将我的本地数据中心连接到 AWS 和 Azure。包括用于冗余的双 VPN 隧道、用于动态路由的 BGP 配置,并解释故障转移机制。
Direct Connect 迁移路径
我目前使用站点到站点 VPN 进行混合云设置。帮助我规划迁移到 AWS Direct Connect 以获得更好的性能。比较成本、带宽选项,并提供分步迁移计划。
多云混合网络
设计一个中心辐射型混合网络架构,我的本地数据中心连接到 AWS(us-east-1)、Azure(East US)和 GCP(us-central1)。包括路由注意事项、云提供商之间的安全边界和成本优化策略。

最佳实践

  • 始终部署双 VPN 隧道以实现冗余 - 单点故障会导致生产中断
  • 对于需要一致性能的生产工作负载,使用私有连接(Direct Connect/ExpressRoute)而非互联网 VPN
  • 使用 CloudWatch、Azure Monitor 或 GCP Cloud Logging 实施全面监控,以跟踪隧道状态、带宽利用率和 BGP 会话健康状况

避免

  • 当 BGP 可用时不要使用静态路由 - 静态路由需要手动更新且不支持自动故障转移
  • 避免通过 BGP 通告公共 IP 范围 - 这会产生路由冲突和安全漏洞
  • 在生产之前不要跳过故障转移场景测试 - 验证在主隧道维护期间流量是否切换到备用隧道

常见问题

我应该为我的混合网络使用 VPN 还是 Direct Connect?
使用站点到站点 VPN 进行初始迁移、开发环境和带宽低于 1 Gbps 的场景。对于需要低延迟、一致性能或带宽超过 1 Gbps 的生产工作负载,选择 Direct Connect 或 ExpressRoute。许多组织从 VPN 开始,随着工作负载增长迁移到专用连接。
我应该为我的本地路由器使用什么 BGP ASN?
对于不连接公共互联网的内部网络,使用私有 ASN(64512-65534)。如果您已经从 ISP 获得了公共 ASN,请使用该 ASN。常见默认值:65000。云侧使用提供商 ASN(AWS:64512,Azure:65515,GCP:16550)。
Direct Connect 配置需要多长时间?
AWS Direct Connect 通过合作伙伴进行物理线路配置通常需要 2-4 周。Azure ExpressRoute 类似:2-4 周。VPN 连接可以在几分钟内建立。提前规划混合网络架构以适应迁移时间表的提前期。
我可以将一个数据中心连接到多个云提供商吗?
可以 - 多云混合网络很常见。每个云提供商需要单独的连接(到 AWS 的 Direct Connect、到 Azure 的 ExpressRoute、到 GCP 的 Interconnect)。实施以您的数据中心为中心的中心辐射型模式,为每个云提供商使用单独的线路。考虑使用中转网关简化路由。
如何排除 VPN 隧道故障?
在云控制台中检查隧道状态(开启/关闭),验证 BGP 会话状态(已建立/空闲),查看 CloudWatch 日志中的隧道遥测数据,确认本地路由器配置与云 VPN 设置匹配,使用 ping/traceroute 测试两侧实例的连接性,并检查安全组/网络 ACL 未阻止所需流量。
此技能会配置我的实际网络基础设施吗?
不会 - 此技能提供 Terraform 模板、架构指导和最佳实践。您必须使用自己的 Terraform 工作流审查、定制和应用基础设施即代码模板。此技能帮助设计和文档化,但不会在您的云账户或网络设备上执行更改。

开发者详情

文件结构

📄 SKILL.md