Practical VPN setup guide covering WireGuard, OpenVPN, and strongSwan IPsec configuration and management.
- skills.sh installs
- 194
- GitHub stars
- 60
- last updated
- Aug 21, 2026
What it does
- Covers WireGuard key generation, server and client configs, and
wg-quickor systemd management for each peer - Includes OpenVPN PKI setup with easy-rsa, server and client
.conftemplates, and certificate revocation steps - Provides a strongSwan IKEv2 configuration with EAP-MSCHAPv2 user authentication and certificate generation with
ipsec pki - Designed for administrators deploying remote-access or site-to-site tunnels across Debian, Ubuntu, CentOS, and RHEL hosts
Install
$ npx -y skills add chaterm/terminal-skills --skill vpn -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
VPN 配置与管理
概述
OpenVPN、WireGuard、IPSec VPN 配置与管理技能。
WireGuard
安装
# Debian/Ubuntu
apt install wireguard
# CentOS/RHEL
yum install epel-release elrepo-release
yum install kmod-wireguard wireguard-tools
# 验证安装
wg --version
生成密钥
# 生成私钥
wg genkey > privatekey
# 从私钥生成公钥
wg pubkey < privatekey > publickey
# 一步生成
wg genkey | tee privatekey | wg pubkey > publickey
# 生成预共享密钥(可选,增强安全)
wg genpsk > presharedkey
服务端配置
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <server_private_key>
# 启用 IP 转发
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = <client_public_key>
AllowedIPs = 10.0.0.2/32
客户端配置
# /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.2/24
PrivateKey = <client_private_key>
DNS = 8.8.8.8
[Peer]
PublicKey = <server_public_key>
Endpoint = server.example.com:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
管理命令
# 启动
wg-quick up wg0
systemctl start wg-quick@wg0
Details
- Repository
- github.com/chaterm/terminal-skills
- Categories
- DevOps & Cloud, Security
- First seen
- Jun 3, 2026
More from chaterm/terminal-skills
All 5Similar to Vpn
More DevOps & Cloud
homelab-wireguard-vpnSkillaffaan-m/ecc5.9K installsStep-by-step WireGuard setup for home-network remote access, with split and full tunnel routing.
edgesecurityaccess-wireguard-vpnSkillreason-machines/security-skills670 installsLightweight WireGuard VPN suite for Linux with an HTTP API that serves per-user client configurations.
nostr-vpnPluginmmalmi/nostr-vpn1.3K starsSet up and inspect a Nostr VPN private mesh with the nvpn CLI. Use local keys and signed administrator approval instead of a VPN provider account. Connecting re
tailscaleSkillel-feo/ai-context329 installsComprehensive Tailscale mesh VPN guide covering setup, access control, Serve/Funnel, and production deployment.
hybrid-cloud-networkingSkillwshobson/agents11.1K installsMulti-cloud hybrid connectivity guide covering VPN and dedicated links to AWS, Azure, GCP, and OCI.
rustunnelMCP serverjoaoh82668 starsOpen-source tunnel giving AI agents public HTTPS, TCP, and UDP URLs for localhost services.
