Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Wireguard

BSecurity

Expert coverage of WireGuard VPN: Noise protocol framework, Cryptokey Routing, wg-quick configuration, AllowedIPs routing, PSK post-quantum protection, kernel vs userspace implementations, deployment patterns (hub-spoke, site-to-site, mesh), Tailscale/Headscale/Netmaker orchestration, and container networking. Use for \"WireGuard\", \"wg-quick\", \"AllowedIPs\", \"Cryptokey Routing\", \"wg genkey\", \"Tailscale\", \"Headscale\", \"Netmaker\", \"wireguard-go\", \"PersistentKeepalive\". Do NOT ...

4 stars
0 votes
0 copies
0 views
Added 9/24/2026
devopsgobashterraformapibackendperformance

Works with

cliapi

Security Analysis

B88/100
criticalModifies startup scripts or system services for persistence

Pro scans all 2 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add chrishuffman5/domain-expert --skill wireguard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wireguard?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Wireguard
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/chrishuffman5-wireguard/badge)](https://www.skillsdirectory.com/skills/chrishuffman5-wireguard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: wireguard
description: "Expert coverage of WireGuard VPN: Noise protocol framework, Cryptokey Routing, wg-quick configuration, AllowedIPs routing, PSK post-quantum protection, kernel vs userspace implementations, deployment patterns (hub-spoke, site-to-site, mesh), Tailscale/Headscale/Netmaker orchestration, and container networking. Use for \"WireGuard\", \"wg-quick\", \"AllowedIPs\", \"Cryptokey Routing\", \"wg genkey\", \"Tailscale\", \"Headscale\", \"Netmaker\", \"wireguard-go\", \"PersistentKeepalive\". Do NOT use for cross-vendor comparison, platform selection, or category-wide architecture -- use the `vpn` skill."
license: MIT
---

# WireGuard

This skill covers WireGuard VPN. Areas of expertise include:

- Noise Protocol Framework (Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s)
- Cryptokey Routing (public key -> AllowedIPs mapping)
- Fixed cryptography (Curve25519, ChaCha20-Poly1305, BLAKE2s, HKDF)
- wg-quick configuration and systemd integration
- AllowedIPs routing logic (outbound: routing table; inbound: source filter)
- PSK for post-quantum protection
- Kernel module (Linux 5.6+) vs userspace implementations (wireguard-go, BoringTun)
- Deployment patterns: point-to-point, hub-spoke, site-to-site, mesh
- Management platforms: Tailscale, Headscale, Netmaker, Firezone, NetBird
- Container networking (Calico, Flannel WireGuard backends)
- MTU calculation and optimization

## How to Approach Tasks

1. **Classify**: Configuration, troubleshooting, architecture, or management platform selection
2. **Identify deployment pattern**: Point-to-point, hub-spoke, site-to-site, or mesh
3. **Load context** from `references/architecture.md` for protocol and crypto details
4. **Analyze** with WireGuard-specific understanding (stateless design, no negotiation)
5. **Recommend** with concrete config examples and operational guidance

## Core Concepts

### Cryptokey Routing
WireGuard's routing table maps public keys to allowed IP ranges. No cipher negotiation -- algorithms are fixed and hardcoded, eliminating downgrade attacks.

```
Interface: wg0 (private key: <interface_privkey>)
  Peer: <pubkey_A> -> AllowedIPs: 10.0.0.2/32
  Peer: <pubkey_B> -> AllowedIPs: 10.0.0.3/32, 192.168.10.0/24
```

### AllowedIPs Dual Purpose
1. **Outbound**: Routing table -- determines which peer to encrypt for
2. **Inbound**: Source IP filter -- only accept packets from peer if source IP matches AllowedIPs

```
AllowedIPs = 0.0.0.0/0        # Full tunnel (all traffic via VPN)
AllowedIPs = 10.0.0.0/8       # Split tunnel (only RFC 1918)
AllowedIPs = 10.0.0.2/32      # Minimal (peer's VPN IP only)
```

### Fixed Cryptography
No negotiation. All primitives are hardcoded:
- **Key exchange**: Curve25519 (X25519 ECDH)
- **Encryption**: ChaCha20-Poly1305 (AEAD)
- **Hashing**: BLAKE2s
- **KDF**: HKDF
- **Session key rotation**: Every 180 seconds automatically (forward secrecy)

## Configuration

### Key Generation
```bash
wg genkey > private.key
wg pubkey < private.key > public.key
wg genpsk > preshared.key              # PSK for post-quantum protection
```

### Server Configuration (`/etc/wireguard/wg0.conf`)
```ini
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <server_private>
MTU = 1420

PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = <client_public>
PresharedKey = <psk>
AllowedIPs = 10.0.0.2/32
```

### Client Configuration
```ini
[Interface]
Address = 10.0.0.2/32
PrivateKey = <client_private>
DNS = 10.0.0.1, 8.8.8.8
MTU = 1420

[Peer]
PublicKey = <server_public>
PresharedKey = <psk>
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0, ::/0          # Full tunnel
PersistentKeepalive = 25               # Required behind NAT
```

### MTU Calculation
WireGuard overhead: ~60 bytes (20 IP + 8 UDP + 32 WG header + 16 Poly1305 tag)
```
Standard Ethernet: 1500 - 60 = 1420 (recommended default)
PPPoE (1492): 1492 - 60 = 1432
Safe for IPv6: 1280
```

## Operations

```bash
wg-quick up wg0                    # Bring up from /etc/wireguard/wg0.conf
wg-quick down wg0                  # Tear down
wg show                            # All interfaces: peers, endpoints, traffic
wg show wg0 transfer               # RX/TX bytes per peer
wg show wg0 latest-handshakes      # Last handshake per peer
wg set wg0 peer <pubkey> endpoint <ip>:<port>  # Update peer endpoint
wg set wg0 peer <pubkey> remove    # Remove peer
wg syncconf wg0 <(wg-quick strip wg0)  # Reload config without restart
systemctl enable wg-quick@wg0      # Enable at boot
```

## Deployment Patterns

### Hub-and-Spoke (Remote Access)
Hub has one [Peer] block per client. Hub requires `net.ipv4.ip_forward = 1`. Spoke-to-spoke traffic routes through hub.

### Site-to-Site
Both gateways have AllowedIPs including the remote LAN subnet. Both need Endpoint set. Add static routes or run OSPF/BGP over WireGuard interface.

### Mesh (via Orchestration)
Direct peer-to-peer using Tailscale, Headscale, Netmaker, or NetBird. These handle key distribution, NAT traversal, and peer discovery automatically.

## Management Platforms

| Platform | Key Feature | License |
|---|---|---|
| **Tailscale** | Managed mesh VPN; MagicDNS; ACL policies; DERP relay | Proprietary (free tier) |
| **Headscale** | Self-hosted Tailscale-compatible coordination server | Open source |
| **Netmaker** | Kernel-space WireGuard mesh; REST API; ~8 Gbps | Open source |
| **Firezone** | Web UI; SSO (OIDC/SAML); per-user policies | Open source |
| **NetBird** | Zero-config mesh; STUN/TURN NAT traversal; SSO | Open source |

## PSK for Post-Quantum Protection
```ini
PresharedKey = <wg genpsk output>
```
Adds 256-bit symmetric key into handshake derivation. Even if Curve25519 is broken by quantum computers, the attacker still needs the PSK. Recommended for sensitive deployments now as a quantum hedge.

## Common Pitfalls

1. **AllowedIPs overlap**: Two peers cannot have overlapping AllowedIPs -- WireGuard cannot route to both. Ensure each peer has unique IP ranges.
2. **Forgetting PersistentKeepalive**: Behind NAT, without keepalive, the NAT mapping expires and the peer becomes unreachable. Set to 25 seconds.
3. **Full tunnel DNS leak**: With AllowedIPs = 0.0.0.0/0, DNS must also route through VPN. Set DNS in [Interface] section.
4. **MTU issues**: Symptoms: connections stall after handshake, large transfers fail. Set MTU to 1420 (or lower for PPPoE/double-encapsulation).
5. **No built-in logging**: WireGuard is intentionally silent. Monitor at the OS level (iptables LOG, tcpdump).
6. **Key distribution at scale**: Without orchestration, manual key exchange becomes unmanageable beyond ~20 peers. Use Tailscale, Netmaker, or config management.
7. **UDP blocking**: Some networks block UDP. WireGuard has no TCP fallback. Use udp2raw or wstunnel for TCP tunneling, or Tailscale DERP relay.

## Limitations

| Limitation | Workaround |
|---|---|
| UDP only | udp2raw, wstunnel, Tailscale DERP |
| No user authentication | Firezone, wg-access-server, Tailscale (SSO layer) |
| No key distribution | Tailscale/Headscale, Netmaker, Ansible/Terraform |
| No dynamic IP support | PersistentKeepalive + `wg set` scripts; Tailscale |
| No access control | Firewall rules; per-user subnets; orchestration platforms |
| Blockable (UDP signature) | wstunnel (WebSocket), domain fronting |

## Reference Files

- `references/architecture.md` -- Noise protocol, cryptographic primitives, handshake flow, DoS protection, key timers, performance benchmarks, container deployment.

Attribution

chrishuffman5chrishuffman5
View sourceSee grades on GitHubMore from chrishuffman5 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

401991 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2699140 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

971540 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953190 votes
View all in devops →