---
tags:
  - Scirpts
  - Desktop
  - Wireguard
---
# WireGuard VPN Client Configuration (`wg0.conf`)

This file contains the complete configuration for the specified WireGuard tunnel connection (`wg0`). This config must be stored in the appropriate directory (e.g., `/etc/wireguard/wg0.conf` on Linux). **Never share this file** as it contains sensitive private keys and tunnel endpoints.

## Configuration Details

The following parameters define the local interface and peer requirements for a secure connection:

```config
[Interface]
PrivateKey = eEfE3hyySaaXj2FDF0RTty2Y4+5HickA7Ksx9oN+9n4=
Address = 10.0.0.2/32
MTU = 1420
DNS = 192.168.2.9

[Peer]
PublicKey = hVUB9ytn1Fr4hXK45g1UeCnGEtcd3rAXcDM2iPo66Bc=
AllowedIPs = 0.0.0.0/0
Endpoint = wg2.mikemcfetridge.com:51820
PersistentKeepalive = 21
```

> [!NOTE] Modernized Workflow
The process of storing private keys and server configurations in dedicated, secure secrets managers (like HashiCorp Vault) is the modern best practice. Instead of modifying plain text files, consider scripting automatic fetching or injecting these secrets at runtime to reduce exposure risk.