[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FD2QC3EPZKPPWDNX48B6S1":3,"skill-same:01M6FD2QC3EPZKPPWDNX48B6S1":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":30,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":58,"install":59,"resources":72},"01M6FD2QC3EPZKPPWDNX48B6S1","vpn-setup",null,"Configure WireGuard, OpenVPN, and cloud VPNs. Implement secure remote access and site-to-site connectivity. Use when setting up secure network tunnels.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-vpn-setup\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"setup","vpn setup","vpn","2026","security","when","remote","relevant","scripts","scope","critical","active","main","community","up","only","configure","access","devops-security","network","assessment","secure","2026-11-10 10:12:30",false,"---\nname: vpn-setup\ndescription: Configure WireGuard, OpenVPN, and cloud VPNs. Implement secure remote\n  access and site-to-site connectivity. Use when setting up secure network tunnels.\ncategory: security\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant security tooling (scanners, vault CLIs) and an\n  authorized scope for any active assessment. Docs-only; helper scripts and templates\n  not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# VPN Setup\n\nConfigure secure VPN tunnels for remote access and site connectivity.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up secure remote access for employees or contractors\n- Connecting on-premises networks to cloud environments (site-to-site)\n- Encrypting traffic between data centers or regions\n- Implementing a mesh VPN for distributed infrastructure\n- Providing secure access to internal services without exposing them publicly\n\nConfirm routing\u002Fsubnet overlap, client reachability, management fallback and maintenance scope before changing tunnels\u002Ffirewalls. Full-tunnel IPv4 does not provide IPv6 or DNS leak protection automatically. The WireGuard server DNS line does not push DNS to peers: configure an actual reachable resolver in each client. Peer script is illustrative and needs serialized allocation, symlink-safe storage, per-peer PSKs and rollback before production. QR codes contain private keys: never log or share them publicly. Protect CA keys offline and prefer passphrase protection; nopass examples are not a production CA policy.\n\n## Prerequisites\n\n- Linux server with a public IP for VPN endpoint\n- Root\u002Fsudo access on the VPN server\n- Firewall rules allowing VPN traffic (UDP 51820 for WireGuard, UDP 1194 for OpenVPN)\n- DNS configured for VPN hostname (optional but recommended)\n- Understanding of IP subnetting and routing\n\n## WireGuard\n\n### Server Setup\n\n```bash\n# Install WireGuard (Ubuntu\u002FDebian)\napt update && apt install -y wireguard\n\n# Generate server keys\numask 077\nwg genkey | tee \u002Fetc\u002Fwireguard\u002Fserver_private.key | wg pubkey > \u002Fetc\u002Fwireguard\u002Fserver_public.key\nchmod 600 \u002Fetc\u002Fwireguard\u002Fserver_private.key\n\n# Generate pre-shared key (optional, adds post-quantum resistance)\nwg genpsk > \u002Fetc\u002Fwireguard\u002Fpsk.key\nchmod 600 \u002Fetc\u002Fwireguard\u002Fpsk.key\n```\n\n### Server Configuration\n\n```ini\n# \u002Fetc\u002Fwireguard\u002Fwg0.conf\n[Interface]\nAddress = 10.0.0.1\u002F24\nListenPort = 51820\nPrivateKey = \u003Cserver-private-key>\n\n# Enable IP forwarding and NAT on startup\nPostUp = sysctl -w net.ipv4.ip_forward=1\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT\nPostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT\nPostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\n\n# DNS for clients\nDNS = 10.0.0.1\n\n# Peer: Alice (laptop)\n[Peer]\nPublicKey = \u003Calice-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.2\u002F32\n\n# Peer: Bob (mobile)\n[Peer]\nPublicKey = \u003Cbob-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.3\u002F32\n\n# Peer: Office network (site-to-site)\n[Peer]\nPublicKey = \u003Coffice-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.4\u002F32, 192.168.1.0\u002F24\nEndpoint = office.example.com:51820\nPersistentKeepalive = 25\n```\n\n### Client Configuration\n\n```ini\n# Client config: alice.conf\n[Interface]\nAddress = 10.0.0.2\u002F24\nPrivateKey = \u003Calice-private-key>\nDNS = 10.0.0.1\n\n[Peer]\nPublicKey = \u003Cserver-public-key>\nPresharedKey = \u003Cpreshared-key>\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0\u002F0\n# IPv6 requires separately configured tunnel addressing\u002Fforwarding and leak tests.\nPersistentKeepalive = 25\n```\n\n### Split Tunneling Configuration\n\n```ini\n# Client config with split tunnel (only route internal traffic through VPN)\n[Interface]\nAddress = 10.0.0.2\u002F24\nPrivateKey = \u003Calice-private-key>\n# No DNS override for split tunnel\n\n[Peer]\nPublicKey = \u003Cserver-public-key>\nPresharedKey = \u003Cpreshared-key>\nEndpoint = vpn.example.com:51820\n# Only route specific subnets through VPN\nAllowedIPs = 10.0.0.0\u002F24, 172.16.0.0\u002F16, 192.168.1.0\u002F24\nPersistentKeepalive = 25\n```\n\n### WireGuard Management Commands\n\n```bash\n# Start\u002Fstop interface\nwg-quick up wg0\nwg-quick down wg0\n\n# Enable on boot\nsystemctl enable wg-quick@wg0\n\n# Show connection status\nwg show\nwg show wg0\n\n# Add a new peer dynamically\nwg set wg0 peer \u003Cnew-public-key> allowed-ips 10.0.0.5\u002F32\n\n# Remove a peer\nwg set wg0 peer \u003Cpublic-key> remove\n\n# Show transfer statistics\nwg show wg0 transfer\n\n# Generate QR code for mobile clients\napt install -y qrencode\nqrencode -t ansiutf8 \u003C alice-mobile.conf\n```\n\n### Peer Management Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# wg-add-peer.sh - Add a new WireGuard peer\nset -euo pipefail\numask 077\n\nPEER_NAME=\"${1:?Usage: $0 \u003Cpeer-name>}\"\n[[ \"$PEER_NAME\" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]] || exit 1\nSERVER_CONF=\"\u002Fetc\u002Fwireguard\u002Fwg0.conf\"\nCLIENTS_DIR=\"\u002Fetc\u002Fwireguard\u002Fclients\"\nSERVER_PUBKEY=$(cat \u002Fetc\u002Fwireguard\u002Fserver_public.key)\nSERVER_ENDPOINT=\"vpn.example.com:51820\"\nPSK=$(cat \u002Fetc\u002Fwireguard\u002Fpsk.key)\n\n# Find next available IP\nLAST_IP=$(grep -oP 'AllowedIPs = 10\\.0\\.0\\.\\K[0-9]+' \"$SERVER_CONF\" | sort -n | tail -1)\nNEXT_IP=$((LAST_IP + 1))\n\n[[ \"$NEXT_IP\" -ge 2 && \"$NEXT_IP\" -le 254 ]] || { echo \"Address pool exhausted\"; exit 1; }\nmkdir -p \"$CLIENTS_DIR\"\n[[ ! -e \"$CLIENTS_DIR\u002F${PEER_NAME}.conf\" ]] || { echo \"Peer exists\"; exit 1; }\n\n# Generate client keys\nwg genkey | tee \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\" | wg pubkey > \"$CLIENTS_DIR\u002F${PEER_NAME}_public.key\"\nchmod 600 \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\"\n\nCLIENT_PRIVKEY=$(cat \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\")\nCLIENT_PUBKEY=$(cat \"$CLIENTS_DIR\u002F${PEER_NAME}_public.key\")\n\n# Add peer to server config\ncat >> \"$SERVER_CONF\" \u003C\u003C EOF\n\n# Peer: ${PEER_NAME}\n[Peer]\nPublicKey = ${CLIENT_PUBKEY}\nPresharedKey = ${PSK}\nAllowedIPs = 10.0.0.${NEXT_IP}\u002F32\nEOF\n\n# Generate client config\ncat > \"$CLIENTS_DIR\u002F${PEER_NAME}.conf\" \u003C\u003C EOF\n[Interface]\nAddress = 10.0.0.${NEXT_IP}\u002F24\nPrivateKey = ${CLIENT_PRIVKEY}\nDNS = 10.0.0.1\n\n[Peer]\nPublicKey = ${SERVER_PUBKEY}\nPresharedKey = ${PSK}\nEndpoint = ${SERVER_ENDPOINT}\nAllowedIPs = 0.0.0.0\u002F0\n# IPv6 requires separately configured tunnel addressing\u002Fforwarding and leak tests.\nPersistentKeepalive = 25\nEOF\n\n# Reload WireGuard\nwg syncconf wg0 \u003C(wg-quick strip wg0)\n\necho \"Peer ${PEER_NAME} added with IP 10.0.0.${NEXT_IP}\"\necho \"Client config: ${CLIENTS_DIR}\u002F${PEER_NAME}.conf\"\n```\n\n## OpenVPN\n\n### Server Setup\n\n```bash\n# Install OpenVPN and Easy-RSA\napt install -y openvpn easy-rsa\n\n# Initialize PKI\nmake-cadir \u002Fetc\u002Fopenvpn\u002Feasy-rsa\ncd \u002Fetc\u002Fopenvpn\u002Feasy-rsa\n\n.\u002Feasyrsa init-pki\n.\u002Feasyrsa build-ca nopass\n.\u002Feasyrsa gen-req server nopass\n.\u002Feasyrsa sign-req server server\n.\u002Feasyrsa gen-dh\nopenvpn --genkey secret \u002Fetc\u002Fopenvpn\u002Fta.key\n\n# Generate client certificate\n.\u002Feasyrsa gen-req client1 nopass\n.\u002Feasyrsa sign-req client client1\n```\n\n### Server Configuration\n\n```ini\n# \u002Fetc\u002Fopenvpn\u002Fserver.conf\nport 1194\nproto udp\ndev tun\n\nca \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fca.crt\ncert \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fissued\u002Fserver.crt\nkey \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fprivate\u002Fserver.key\ndh \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fdh.pem\ntls-auth \u002Fetc\u002Fopenvpn\u002Fta.key 0\n\nserver 10.8.0.0 255.255.255.0\n\n# Route client traffic through VPN\npush \"redirect-gateway def1 bypass-dhcp\"\npush \"dhcp-option DNS 8.8.8.8\"\npush \"dhcp-option DNS 8.8.4.4\"\n\n# Split tunnel: push specific routes instead\n# push \"route 172.16.0.0 255.255.0.0\"\n# push \"route 192.168.1.0 255.255.255.0\"\n\nkeepalive 10 120\n\n# Cipher and auth\ncipher AES-256-GCM\nauth SHA256\ndata-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305\n\n# Hardening\ntls-version-min 1.2\ntls-cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384\n\nuser nobody\ngroup nogroup\npersist-key\npersist-tun\n\n# Logging\nstatus \u002Fvar\u002Flog\u002Fopenvpn\u002Fstatus.log\nlog-append \u002Fvar\u002Flog\u002Fopenvpn\u002Fopenvpn.log\nverb 3\n\n# Max clients\nmax-clients 100\n\n# Omit client-to-client; enforce peer isolation with verified firewall policy.\n```\n\n### Client Configuration\n\n```ini\n# client1.ovpn\nclient\ndev tun\nproto udp\nremote vpn.example.com 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\n\nca ca.crt\ncert client1.crt\nkey client1.key\ntls-auth ta.key 1\n\ncipher AES-256-GCM\nauth SHA256\n\nverb 3\n```\n\n## Tailscale (Managed WireGuard)\n\n```bash\n# Install Tailscale\ntmpdir=\"$(mktemp -d)\"\ncurl -fsSL https:\u002F\u002Ftailscale.com\u002Finstall.sh -o \"$tmpdir\u002Finstall.sh\"\ncat \"$tmpdir\u002Finstall.sh\"  # inspect complete script before executing\nsh \"$tmpdir\u002Finstall.sh\"\nrm -rf \"$tmpdir\"\n\n# Authenticate and connect\ntailscale up\n\n# Advertise subnet routes (act as a gateway)\ntailscale up --advertise-routes=192.168.1.0\u002F24,172.16.0.0\u002F16\n\n# Enable as exit node (route all traffic)\ntailscale up --advertise-exit-node\n\n# Use an exit node\ntailscale up --exit-node=\u003Cexit-node-ip>\n\n# Check status\ntailscale status\n\n# Access control: tailscale ACL policy (in admin console)\n# Example ACL policy\ncat \u003C\u003C 'EOF'\n{\n  \"acls\": [\n    {\"action\": \"accept\", \"src\": [\"group:engineering\"], \"dst\": [\"tag:servers:*\"]},\n    {\"action\": \"accept\", \"src\": [\"group:devops\"], \"dst\": [\"*:*\"]},\n    {\"action\": \"accept\", \"src\": [\"tag:monitoring\"], \"dst\": [\"tag:servers:9100\"]}\n  ],\n  \"tagOwners\": {\n    \"tag:servers\": [\"group:devops\"],\n    \"tag:monitoring\": [\"group:devops\"]\n  },\n  \"groups\": {\n    \"group:engineering\": [\"alice@example.com\", \"bob@example.com\"],\n    \"group:devops\": [\"charlie@example.com\"]\n  }\n}\nEOF\n\n# Enable MagicDNS and set DNS\ntailscale up --accept-dns\n\n# SSH via Tailscale (no SSH keys needed)\ntailscale up --ssh\n```\n\n## AWS Site-to-Site VPN\n\n```bash\n# Create Virtual Private Gateway\nVGW_ID=$(aws ec2 create-vpn-gateway --type ipsec.1 --query 'VpnGateway.VpnGatewayId' --output text)\n\n# Attach to VPC\naws ec2 attach-vpn-gateway --vpn-gateway-id \"$VGW_ID\" --vpc-id vpc-0abc123\n\n# Create Customer Gateway (your on-prem device)\nCGW_ID=$(aws ec2 create-customer-gateway \\\n  --type ipsec.1 \\\n  --bgp-asn 65000 \\\n  --public-ip 203.0.113.10 \\\n  --query 'CustomerGateway.CustomerGatewayId' --output text)\n\n# Create VPN connection\nVPN_ID=$(aws ec2 create-vpn-connection \\\n  --type ipsec.1 \\\n  --customer-gateway-id \"$CGW_ID\" \\\n  --vpn-gateway-id \"$VGW_ID\" \\\n  --options '{\"StaticRoutesOnly\":false}' \\\n  --query 'VpnConnection.VpnConnectionId' --output text)\n\n# Download configuration for your device\naws ec2 describe-vpn-connections --vpn-connection-ids \"$VPN_ID\"\n\n# Enable route propagation\naws ec2 enable-vgw-route-propagation \\\n  --gateway-id \"$VGW_ID\" \\\n  --route-table-id rtb-0abc123\n\n# Monitor VPN tunnel status\naws ec2 describe-vpn-connections \\\n  --vpn-connection-ids \"$VPN_ID\" \\\n  --query 'VpnConnections[0].VgwTelemetry'\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| WireGuard handshake never completes | Firewall blocking UDP 51820 | Open UDP 51820 on server firewall and any intermediate firewalls |\n| No internet through VPN | IP forwarding disabled or NAT missing | Enable `net.ipv4.ip_forward=1`; verify PostUp iptables rules |\n| DNS not resolving over VPN | DNS not pushed or local DNS conflicts | Set `DNS = ` in client config; check `\u002Fetc\u002Fresolv.conf` |\n| OpenVPN TLS handshake fails | Certificate mismatch or expired | Verify CA cert matches; check certificate dates with `openssl x509 -dates` |\n| Split tunnel leaks traffic | AllowedIPs too broad | Set only specific subnets in AllowedIPs; verify with `traceroute` |\n| Tailscale node unreachable | ACL blocking traffic | Check Tailscale admin ACL policy; verify node is online with `tailscale status` |\n| AWS VPN tunnel flapping | Idle timeout or DPD misconfigured | Enable DPD on customer gateway; send periodic keep-alive traffic |\n| Slow VPN performance | MTU issues causing fragmentation | Set `MTU = 1420` in WireGuard config; test with `ping -M do -s 1400` |\n\n## Best Practices\n\n- Use WireGuard for modern deployments (simpler, faster, smaller attack surface)\n- Implement MFA for VPN access where possible\n- Rotate keys regularly (quarterly for WireGuard, annual for OpenVPN certs)\n- Monitor VPN connections and alert on anomalies\n- Segment VPN access by role using split tunneling or ACLs\n- Use pre-shared keys with WireGuard for post-quantum resistance\n- Keep VPN software updated to patch security vulnerabilities\n- Log all VPN connection events for audit purposes\n- Disable VPN access immediately when employees leave\n- Test failover for site-to-site VPN connections\n\n## Related Skills\n\n- zero-trust (`zero-trust`) - Modern access patterns\n- ssl-tls-management (`ssl-tls-management`) - Certificate management\n- firewall-config (`firewall-config`) - Network access control\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n","# VPN Setup\n\nConfigure secure VPN tunnels for remote access and site connectivity.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up secure remote access for employees or contractors\n- Connecting on-premises networks to cloud environments (site-to-site)\n- Encrypting traffic between data centers or regions\n- Implementing a mesh VPN for distributed infrastructure\n- Providing secure access to internal services without exposing them publicly\n\nConfirm routing\u002Fsubnet overlap, client reachability, management fallback and maintenance scope before changing tunnels\u002Ffirewalls. Full-tunnel IPv4 does not provide IPv6 or DNS leak protection automatically. The WireGuard server DNS line does not push DNS to peers: configure an actual reachable resolver in each client. Peer script is illustrative and needs serialized allocation, symlink-safe storage, per-peer PSKs and rollback before production. QR codes contain private keys: never log or share them publicly. Protect CA keys offline and prefer passphrase protection; nopass examples are not a production CA policy.\n\n## Prerequisites\n\n- Linux server with a public IP for VPN endpoint\n- Root\u002Fsudo access on the VPN server\n- Firewall rules allowing VPN traffic (UDP 51820 for WireGuard, UDP 1194 for OpenVPN)\n- DNS configured for VPN hostname (optional but recommended)\n- Understanding of IP subnetting and routing\n\n## WireGuard\n\n### Server Setup\n\n```bash\n# Install WireGuard (Ubuntu\u002FDebian)\napt update && apt install -y wireguard\n\n# Generate server keys\numask 077\nwg genkey | tee \u002Fetc\u002Fwireguard\u002Fserver_private.key | wg pubkey > \u002Fetc\u002Fwireguard\u002Fserver_public.key\nchmod 600 \u002Fetc\u002Fwireguard\u002Fserver_private.key\n\n# Generate pre-shared key (optional, adds post-quantum resistance)\nwg genpsk > \u002Fetc\u002Fwireguard\u002Fpsk.key\nchmod 600 \u002Fetc\u002Fwireguard\u002Fpsk.key\n```\n\n### Server Configuration\n\n```ini\n# \u002Fetc\u002Fwireguard\u002Fwg0.conf\n[Interface]\nAddress = 10.0.0.1\u002F24\nListenPort = 51820\nPrivateKey = \u003Cserver-private-key>\n\n# Enable IP forwarding and NAT on startup\nPostUp = sysctl -w net.ipv4.ip_forward=1\nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT\nPostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT\nPostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\n\n# DNS for clients\nDNS = 10.0.0.1\n\n# Peer: Alice (laptop)\n[Peer]\nPublicKey = \u003Calice-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.2\u002F32\n\n# Peer: Bob (mobile)\n[Peer]\nPublicKey = \u003Cbob-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.3\u002F32\n\n# Peer: Office network (site-to-site)\n[Peer]\nPublicKey = \u003Coffice-public-key>\nPresharedKey = \u003Cpreshared-key>\nAllowedIPs = 10.0.0.4\u002F32, 192.168.1.0\u002F24\nEndpoint = office.example.com:51820\nPersistentKeepalive = 25\n```\n\n### Client Configuration\n\n```ini\n# Client config: alice.conf\n[Interface]\nAddress = 10.0.0.2\u002F24\nPrivateKey = \u003Calice-private-key>\nDNS = 10.0.0.1\n\n[Peer]\nPublicKey = \u003Cserver-public-key>\nPresharedKey = \u003Cpreshared-key>\nEndpoint = vpn.example.com:51820\nAllowedIPs = 0.0.0.0\u002F0\n# IPv6 requires separately configured tunnel addressing\u002Fforwarding and leak tests.\nPersistentKeepalive = 25\n```\n\n### Split Tunneling Configuration\n\n```ini\n# Client config with split tunnel (only route internal traffic through VPN)\n[Interface]\nAddress = 10.0.0.2\u002F24\nPrivateKey = \u003Calice-private-key>\n# No DNS override for split tunnel\n\n[Peer]\nPublicKey = \u003Cserver-public-key>\nPresharedKey = \u003Cpreshared-key>\nEndpoint = vpn.example.com:51820\n# Only route specific subnets through VPN\nAllowedIPs = 10.0.0.0\u002F24, 172.16.0.0\u002F16, 192.168.1.0\u002F24\nPersistentKeepalive = 25\n```\n\n### WireGuard Management Commands\n\n```bash\n# Start\u002Fstop interface\nwg-quick up wg0\nwg-quick down wg0\n\n# Enable on boot\nsystemctl enable wg-quick@wg0\n\n# Show connection status\nwg show\nwg show wg0\n\n# Add a new peer dynamically\nwg set wg0 peer \u003Cnew-public-key> allowed-ips 10.0.0.5\u002F32\n\n# Remove a peer\nwg set wg0 peer \u003Cpublic-key> remove\n\n# Show transfer statistics\nwg show wg0 transfer\n\n# Generate QR code for mobile clients\napt install -y qrencode\nqrencode -t ansiutf8 \u003C alice-mobile.conf\n```\n\n### Peer Management Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# wg-add-peer.sh - Add a new WireGuard peer\nset -euo pipefail\numask 077\n\nPEER_NAME=\"${1:?Usage: $0 \u003Cpeer-name>}\"\n[[ \"$PEER_NAME\" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]] || exit 1\nSERVER_CONF=\"\u002Fetc\u002Fwireguard\u002Fwg0.conf\"\nCLIENTS_DIR=\"\u002Fetc\u002Fwireguard\u002Fclients\"\nSERVER_PUBKEY=$(cat \u002Fetc\u002Fwireguard\u002Fserver_public.key)\nSERVER_ENDPOINT=\"vpn.example.com:51820\"\nPSK=$(cat \u002Fetc\u002Fwireguard\u002Fpsk.key)\n\n# Find next available IP\nLAST_IP=$(grep -oP 'AllowedIPs = 10\\.0\\.0\\.\\K[0-9]+' \"$SERVER_CONF\" | sort -n | tail -1)\nNEXT_IP=$((LAST_IP + 1))\n\n[[ \"$NEXT_IP\" -ge 2 && \"$NEXT_IP\" -le 254 ]] || { echo \"Address pool exhausted\"; exit 1; }\nmkdir -p \"$CLIENTS_DIR\"\n[[ ! -e \"$CLIENTS_DIR\u002F${PEER_NAME}.conf\" ]] || { echo \"Peer exists\"; exit 1; }\n\n# Generate client keys\nwg genkey | tee \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\" | wg pubkey > \"$CLIENTS_DIR\u002F${PEER_NAME}_public.key\"\nchmod 600 \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\"\n\nCLIENT_PRIVKEY=$(cat \"$CLIENTS_DIR\u002F${PEER_NAME}_private.key\")\nCLIENT_PUBKEY=$(cat \"$CLIENTS_DIR\u002F${PEER_NAME}_public.key\")\n\n# Add peer to server config\ncat >> \"$SERVER_CONF\" \u003C\u003C EOF\n\n# Peer: ${PEER_NAME}\n[Peer]\nPublicKey = ${CLIENT_PUBKEY}\nPresharedKey = ${PSK}\nAllowedIPs = 10.0.0.${NEXT_IP}\u002F32\nEOF\n\n# Generate client config\ncat > \"$CLIENTS_DIR\u002F${PEER_NAME}.conf\" \u003C\u003C EOF\n[Interface]\nAddress = 10.0.0.${NEXT_IP}\u002F24\nPrivateKey = ${CLIENT_PRIVKEY}\nDNS = 10.0.0.1\n\n[Peer]\nPublicKey = ${SERVER_PUBKEY}\nPresharedKey = ${PSK}\nEndpoint = ${SERVER_ENDPOINT}\nAllowedIPs = 0.0.0.0\u002F0\n# IPv6 requires separately configured tunnel addressing\u002Fforwarding and leak tests.\nPersistentKeepalive = 25\nEOF\n\n# Reload WireGuard\nwg syncconf wg0 \u003C(wg-quick strip wg0)\n\necho \"Peer ${PEER_NAME} added with IP 10.0.0.${NEXT_IP}\"\necho \"Client config: ${CLIENTS_DIR}\u002F${PEER_NAME}.conf\"\n```\n\n## OpenVPN\n\n### Server Setup\n\n```bash\n# Install OpenVPN and Easy-RSA\napt install -y openvpn easy-rsa\n\n# Initialize PKI\nmake-cadir \u002Fetc\u002Fopenvpn\u002Feasy-rsa\ncd \u002Fetc\u002Fopenvpn\u002Feasy-rsa\n\n.\u002Feasyrsa init-pki\n.\u002Feasyrsa build-ca nopass\n.\u002Feasyrsa gen-req server nopass\n.\u002Feasyrsa sign-req server server\n.\u002Feasyrsa gen-dh\nopenvpn --genkey secret \u002Fetc\u002Fopenvpn\u002Fta.key\n\n# Generate client certificate\n.\u002Feasyrsa gen-req client1 nopass\n.\u002Feasyrsa sign-req client client1\n```\n\n### Server Configuration\n\n```ini\n# \u002Fetc\u002Fopenvpn\u002Fserver.conf\nport 1194\nproto udp\ndev tun\n\nca \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fca.crt\ncert \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fissued\u002Fserver.crt\nkey \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fprivate\u002Fserver.key\ndh \u002Fetc\u002Fopenvpn\u002Feasy-rsa\u002Fpki\u002Fdh.pem\ntls-auth \u002Fetc\u002Fopenvpn\u002Fta.key 0\n\nserver 10.8.0.0 255.255.255.0\n\n# Route client traffic through VPN\npush \"redirect-gateway def1 bypass-dhcp\"\npush \"dhcp-option DNS 8.8.8.8\"\npush \"dhcp-option DNS 8.8.4.4\"\n\n# Split tunnel: push specific routes instead\n# push \"route 172.16.0.0 255.255.0.0\"\n# push \"route 192.168.1.0 255.255.255.0\"\n\nkeepalive 10 120\n\n# Cipher and auth\ncipher AES-256-GCM\nauth SHA256\ndata-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305\n\n# Hardening\ntls-version-min 1.2\ntls-cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384\n\nuser nobody\ngroup nogroup\npersist-key\npersist-tun\n\n# Logging\nstatus \u002Fvar\u002Flog\u002Fopenvpn\u002Fstatus.log\nlog-append \u002Fvar\u002Flog\u002Fopenvpn\u002Fopenvpn.log\nverb 3\n\n# Max clients\nmax-clients 100\n\n# Omit client-to-client; enforce peer isolation with verified firewall policy.\n```\n\n### Client Configuration\n\n```ini\n# client1.ovpn\nclient\ndev tun\nproto udp\nremote vpn.example.com 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\n\nca ca.crt\ncert client1.crt\nkey client1.key\ntls-auth ta.key 1\n\ncipher AES-256-GCM\nauth SHA256\n\nverb 3\n```\n\n## Tailscale (Managed WireGuard)\n\n```bash\n# Install Tailscale\ntmpdir=\"$(mktemp -d)\"\ncurl -fsSL https:\u002F\u002Ftailscale.com\u002Finstall.sh -o \"$tmpdir\u002Finstall.sh\"\ncat \"$tmpdir\u002Finstall.sh\"  # inspect complete script before executing\nsh \"$tmpdir\u002Finstall.sh\"\nrm -rf \"$tmpdir\"\n\n# Authenticate and connect\ntailscale up\n\n# Advertise subnet routes (act as a gateway)\ntailscale up --advertise-routes=192.168.1.0\u002F24,172.16.0.0\u002F16\n\n# Enable as exit node (route all traffic)\ntailscale up --advertise-exit-node\n\n# Use an exit node\ntailscale up --exit-node=\u003Cexit-node-ip>\n\n# Check status\ntailscale status\n\n# Access control: tailscale ACL policy (in admin console)\n# Example ACL policy\ncat \u003C\u003C 'EOF'\n{\n  \"acls\": [\n    {\"action\": \"accept\", \"src\": [\"group:engineering\"], \"dst\": [\"tag:servers:*\"]},\n    {\"action\": \"accept\", \"src\": [\"group:devops\"], \"dst\": [\"*:*\"]},\n    {\"action\": \"accept\", \"src\": [\"tag:monitoring\"], \"dst\": [\"tag:servers:9100\"]}\n  ],\n  \"tagOwners\": {\n    \"tag:servers\": [\"group:devops\"],\n    \"tag:monitoring\": [\"group:devops\"]\n  },\n  \"groups\": {\n    \"group:engineering\": [\"alice@example.com\", \"bob@example.com\"],\n    \"group:devops\": [\"charlie@example.com\"]\n  }\n}\nEOF\n\n# Enable MagicDNS and set DNS\ntailscale up --accept-dns\n\n# SSH via Tailscale (no SSH keys needed)\ntailscale up --ssh\n```\n\n## AWS Site-to-Site VPN\n\n```bash\n# Create Virtual Private Gateway\nVGW_ID=$(aws ec2 create-vpn-gateway --type ipsec.1 --query 'VpnGateway.VpnGatewayId' --output text)\n\n# Attach to VPC\naws ec2 attach-vpn-gateway --vpn-gateway-id \"$VGW_ID\" --vpc-id vpc-0abc123\n\n# Create Customer Gateway (your on-prem device)\nCGW_ID=$(aws ec2 create-customer-gateway \\\n  --type ipsec.1 \\\n  --bgp-asn 65000 \\\n  --public-ip 203.0.113.10 \\\n  --query 'CustomerGateway.CustomerGatewayId' --output text)\n\n# Create VPN connection\nVPN_ID=$(aws ec2 create-vpn-connection \\\n  --type ipsec.1 \\\n  --customer-gateway-id \"$CGW_ID\" \\\n  --vpn-gateway-id \"$VGW_ID\" \\\n  --options '{\"StaticRoutesOnly\":false}' \\\n  --query 'VpnConnection.VpnConnectionId' --output text)\n\n# Download configuration for your device\naws ec2 describe-vpn-connections --vpn-connection-ids \"$VPN_ID\"\n\n# Enable route propagation\naws ec2 enable-vgw-route-propagation \\\n  --gateway-id \"$VGW_ID\" \\\n  --route-table-id rtb-0abc123\n\n# Monitor VPN tunnel status\naws ec2 describe-vpn-connections \\\n  --vpn-connection-ids \"$VPN_ID\" \\\n  --query 'VpnConnections[0].VgwTelemetry'\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| WireGuard handshake never completes | Firewall blocking UDP 51820 | Open UDP 51820 on server firewall and any intermediate firewalls |\n| No internet through VPN | IP forwarding disabled or NAT missing | Enable `net.ipv4.ip_forward=1`; verify PostUp iptables rules |\n| DNS not resolving over VPN | DNS not pushed or local DNS conflicts | Set `DNS = ` in client config; check `\u002Fetc\u002Fresolv.conf` |\n| OpenVPN TLS handshake fails | Certificate mismatch or expired | Verify CA cert matches; check certificate dates with `openssl x509 -dates` |\n| Split tunnel leaks traffic | AllowedIPs too broad | Set only specific subnets in AllowedIPs; verify with `traceroute` |\n| Tailscale node unreachable | ACL blocking traffic | Check Tailscale admin ACL policy; verify node is online with `tailscale status` |\n| AWS VPN tunnel flapping | Idle timeout or DPD misconfigured | Enable DPD on customer gateway; send periodic keep-alive traffic |\n| Slow VPN performance | MTU issues causing fragmentation | Set `MTU = 1420` in WireGuard config; test with `ping -M do -s 1400` |\n\n## Best Practices\n\n- Use WireGuard for modern deployments (simpler, faster, smaller attack surface)\n- Implement MFA for VPN access where possible\n- Rotate keys regularly (quarterly for WireGuard, annual for OpenVPN certs)\n- Monitor VPN connections and alert on anomalies\n- Segment VPN access by role using split tunneling or ACLs\n- Use pre-shared keys with WireGuard for post-quantum resistance\n- Keep VPN software updated to patch security vulnerabilities\n- Log all VPN connection events for audit purposes\n- Disable VPN access immediately when employees leave\n- Test failover for site-to-site VPN connections\n\n## Related Skills\n\n- zero-trust (`zero-trust`) - Modern access patterns\n- ssl-tls-management (`ssl-tls-management`) - Certificate management\n- firewall-config (`firewall-config`) - Network access control\n\n## Limitations\n\n- Apply guidance only within authorized scope; test destructive steps in non-production first.\n- Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\n# Read-only first: inventory before any active step.\nwhich \u003Ctool> && \u003Ctool> --help | head -n 20\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n",{"name":5,"risk":28,"source":45,"license":14,"category":22,"metadata":46,"date_added":49,"description":7,"source_repo":50,"source_type":31,"compatibility":51,"license_source":52},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills",{"author":47,"version":48},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant security tooling (scanners, vault CLIs) and an authorized scope for any active assessment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-vpn-setup",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add boisenoise\u002Fskills-collections --skill vpn-setup",{"tool":65,"command":66},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill vpn-setup",{"tool":68,"command":69},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill vpn-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-vpn-setup\u002FSKILL.md",true,[],[74,83,91,100,108,116],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":82},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":82},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":99},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":99},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":99},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":99},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]