Skip to content

Instantly share code, notes, and snippets.

@andp97
Created November 30, 2024 16:42
Show Gist options
  • Save andp97/d95f263a477dfea9bc2e654d4a2a7ebb to your computer and use it in GitHub Desktop.
Save andp97/d95f263a477dfea9bc2e654d4a2a7ebb to your computer and use it in GitHub Desktop.
WireGuard Linux client connection
#!/bin/bash
# Import the WireGuard connection file
sudo nmcli connection import type wireguard file securedns.it.conf
# Connect through WireGuard connection using NetworkManager CLI
nmcli connection up securedns.it
# Disconnect from WireGuard connection using NetworkManager CLI
nmcli connection down securedns.it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment