Files
wg-helpers/del-wg.sh
2021-10-12 16:20:31 +02:00

14 lines
346 B
Bash

#! /usr/bin/env bash
if [ $# -ne 1 ]; then
echo "[!!] I (just) need the base64 pubkey of the target client"
exit 1
fi
# Suppression du pair
wg set wg0 peer $1 remove
# Enregistrement de la modification
wg-quick save wg0
# Suppression de sa config
echo "[++] Peer has been removed (if it really existed)"
echo "[++] Key was : $1"