帮助用户搭建 WireGuard VPN、配置客户端并安全远程访问家庭网络。
该技能材料表现为开源的提示/文档型 WireGuard 配置指南,本身未声明需要密钥、未声明连接第三方远程端点,整体风险较低。其内容涉及系统级网络配置、iptables 与本地敏感配置文件操作,属于此类技能的常规能力,使用时仍需审阅命令后再落地。
材料未要求 API key、token 或外部账号凭证;仅描述 WireGuard 本地公私钥生成与保管要求。私钥属于高敏感本地凭证,但文档明确提示不要共享或提交到版本控制,未见诱导外传或滥用迹象。
未声明连接任何第三方服务端点;网络部分仅说明建立到用户自有 WireGuard 服务器/家庭网络的加密隧道,以及常规 UDP 51820 通信。依据材料,未见将用户数据发送到不相关外部服务的描述。
README 包含 apt 安装、wg 密钥生成、iptables 规则、chmod 及启用转发等系统命令,若照做会在本机以高权限修改网络与防火墙配置。这属于该类运维/网络技能的常规能力,需在执行前逐条审查并确认环境适配。
文档会读写本地配置与密钥文件,例如 /etc/wireguard 下的私钥、公钥和 wg0.conf,并涉及权限设置为仅限本地受控访问。访问范围与 WireGuard 部署目标一致,未见索取无关数据或过度授权描述,但这些文件本身较敏感。
来源为 GitHub 开源仓库,且社区采用度很高(约 210k stars),这显著降低供应链风险。虽然许可证未声明、维护状态未知,且当前提供的是文档片段而非完整代码审计,但基于开源与高社区信号,未见明确红旗。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "homelab-wireguard-vpn" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/homelab-wireguard-vpn/SKILL.md 2. 保存为 ~/.claude/skills/homelab-wireguard-vpn/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为我的家庭实验室生成一份 WireGuard VPN 服务器搭建指南,包括服务端安装、密钥生成、配置文件示例、防火墙与端口转发设置,系统为 Ubuntu。
一份可执行的 Ubuntu WireGuard 服务器部署说明,含配置示例与网络设置要点。
我已经有 WireGuard 服务端,请帮我分别为 iPhone 和 Windows 笔记本生成 peer 配置示例,包含密钥生成步骤、AllowedIPs 设置和二维码导入说明。
适用于手机和电脑的客户端配置示例,并说明如何安全导入和连接。
请比较 WireGuard 的 full tunnel 和 split tunnel 配置差异,并根据“仅访问家庭 NAS 和内网服务,不影响日常上网”的需求,给出推荐配置和 AllowedIPs 示例。
对两种路由模式的清晰对比,以及适合家庭远程访问场景的推荐配置。
WireGuard is a fast, modern VPN protocol. It is the right choice for remote access to a home network — simpler to configure than OpenVPN and faster than most alternatives.
All configuration examples show common setups. Review each command — especially the iptables forwarding rules and key file permissions — before applying them to your system, and make changes in a maintenance window.
Your phone (WireGuard client)
│
│ Encrypted UDP tunnel (port 51820)
│
Your home router (WireGuard server — needs a public IP or DDNS)
│
Your home network (192.168.1.0/24, NAS, Pi, etc.)
Every device has a keypair (public + private key).
The server knows each client's public key.
The client knows the server's public key + endpoint (IP:port).
Traffic is encrypted end-to-end with no central server or certificate authority.
# Install WireGuard
sudo apt update && sudo apt install wireguard -y
# Generate server keypair — create files with private permissions from the start
sudo mkdir -p /etc/wireguard
sudo sh -c 'umask 077; wg genkey > /etc/wireguard/server_private.key'
sudo sh -c 'wg pubkey < /etc/wireguard/server_private.key > /etc/wireguard/server_public.key'
# Write server config — substitute the actual private key value
# Do not store private keys in version control or share them
sudo tee /etc/wireguard/wg0.conf << 'EOF'
[Interface]
Address = 10.8.0.1/24 # VPN subnet — server gets .1
ListenPort = 51820
PrivateKey = <paste_server_private_key_here>
# Scoped forwarding rules: allow VPN traffic in/out, not a blanket FORWARD ACCEPT
PostUp = iptables -A FORWARD -i wg0 -o eth0 -j ACCEPT
PostUp = iptables -A FORWARD -i eth0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -o eth0 -j ACCEPT
PostDown = iptables -D FORWARD -i eth0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
# Phone — replace with the actual phone public key
PublicKey = <phone_public_key>
AllowedIPs = 10.8.0.2/32
[Peer]
# Laptop — replace with the actual laptop public key
PublicKey = <laptop_public_key>
AllowedIPs = 10.8.0.3/32
EOF
sudo chmod 600 /etc/wireguard/wg0.conf
# Replace eth0 with your actual outbound interface name
# Check with: ip route show default
# Enable IP forwarding (required for routing traffic through the server)
echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-wireguard.conf
sudo sysctl --system
# Start WireGuard and enable on boot
sudo wg-quick up wg0
sudo systemctl enable wg-quick@wg0
# Generate a unique keypair for each client device
# Run on the client, or on the server and transfer the private key securely — never in plaintext
umask 077
wg genkey | tee phone_private.key | wg pubkey > phone_public.key
# Client config file (phone_wg0.conf):
[Interface]
PrivateKey = <phone_private_key>
Address = 10.8.0.2/32
DNS = 192.168.1.2 # Optional: use Pi-hole for DNS over the tunnel
[Peer]
PublicKey = <server_public_key>
Endpoint = your-home-ip.ddns.net:51820 # Your public IP or DDNS hostname
AllowedIPs = 192.168.1.0/24 # Split tunnel: only home network traffic
# AllowedIPs = 0.0.0.0/0, ::/0 # Full tunnel: all traffic through VPN
PersistentKeepalive = 25 # Keep NAT hole open (required for mobile clients)
…
读取计划文档并拆解步骤,生成可直接粘贴的 /orchestrate 链式提示词
依据C++核心指南辅助编写、审查与重构更现代安全的C++代码。
调用最新框架与库文档,快速回答配置、API与代码示例问题
在本地审查应用上线准备度,快速发现生产环境风险与薄弱环节。
为 Spring Boot 与 Quarkus 服务生成并统一应用 Java 编码规范。
帮助你设计 Quarkus 3 后端架构模式,覆盖消息、REST、数据访问与异步处理。
为家庭实验室网络改造提供分段、DNS过滤与远程访问变更前检查清单
帮助你规划家庭与实验室网络拓扑、地址分配、设备连接与常见避坑。
为本地服务快速生成可公开访问的 HTTPS、TCP 或 UDP 隧道地址。
帮助开发与运维团队安全地将本地服务通过加密隧道发布到公网。
帮助你部署和维护家庭网络中的 Pi-hole 广告拦截与 DNS 服务
为移动团队管理深度链接、安装归因与实时数据分析。