This commit is contained in:
Mike McFetridge
2026-07-20 09:23:17 -04:00
parent c1315882da
commit 72272e4006
3179 changed files with 562960 additions and 14 deletions
@@ -0,0 +1,30 @@
---
tags:
- Scirpts
- Desktop
- Wireguard
---
^^^ This is all you need to add a wireguard config file. ^^^
If for some reason you still want to use the GUI
Here is my original tutorial
1. Install `nm-connection-editor` via your package manager.
2. Open the Advanced Network Configuration GUI, add a new connection & select WireGuard
![Screenshot from 2023-04-05 18-33-00](https://forum.manjaro.org/uploads/default/original/3X/f/d/fd94540395cf56a59e110db06603faeaf850bd2d.png)
![Screenshot from 2023-04-05 18-33-20](https://forum.manjaro.org/uploads/default/original/3X/6/3/63aa2136115143db16d66cde327087f92b089721.png)
3. Use the following diagram to translate your WireGuard client config file to the Advanced Network Configuration GUI.
[![HowTo](https://forum.manjaro.org/uploads/default/optimized/3X/1/7/177682f37daed1b4e8283f836fd57af349bc4852_2_690x388.jpeg)
HowTo1920×1080 114 KB
](https://forum.manjaro.org/uploads/default/original/3X/1/7/177682f37daed1b4e8283f836fd57af349bc4852.jpeg "HowTo")
Enjoy your WireGuard VPN integrated into the OS!
Note: the “Listen port” will **not** be in your WireGuard client config. I used 58909 & that worked for me.
@@ -0,0 +1,9 @@
---
tags:
- Scirpts
- Desktop
- Wireguard
---
Script to stop the wire-guard connection.
sudo wg-quick down wg0
@@ -0,0 +1,27 @@
---
tags:
- Scirpts
- Desktop
- Wireguard
---
# WireGuard Activation Script (`wg-up.sh`)
This script initializes and activates the configured WireGuard tunnel using `wg-quick`. **Always ensure you have appropriate network permissions (sudo) to run this.**
## Execution Steps
To bring the WireGuard interface online, execute the following command in a privileged shell session:
```bash
sudo wg-quick up wg0
```
### Verification
After running this script, verify the connection status and IP assignment using:
* **Check Tunnel Status:** `wg show`
* **Verify Connectivity:** Attempt to ping an internal service endpoint.
> [!NOTE] Modernized Workflow
While using `sudo wg-quick up wg0` is functional, for system-level automation or service management (e.g., in Docker/Kubernetes), it is best practice to define a corresponding **systemd unit file**. This ensures the connection attempts to start automatically on boot and can be managed via `systemctl status`, providing robust logging and dependency handling beyond simple script execution.
@@ -0,0 +1,30 @@
---
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.