Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielkfr/6432503 to your computer and use it in GitHub Desktop.
Save gabrielkfr/6432503 to your computer and use it in GitHub Desktop.
Script bash que permite revocar las llaves de los Roadwarriors de una VPN montada mediante OpenVPN. Esto evita que los roadwarriors se puedan conectar con la llave que poseen.
#!/bin/bash
#
# SCRIPT PARA REVOCAR LLAVES DE CLIENTES.
#
# -- Se verifica que se haya pasado el common name
# del cliente como argumento.
if [ -z "$1" ]; then
echo "Debe Especificar el nombre del cliente!"
exit
fi
 
# -- Se obtiene el directorio en donde se encuentra
# la aplicacion y se cargan las variables necesarias.
PWD_ACTUAL=`pwd`
source $PWD_ACTUAL/vars > /dev/null
 
# -- Se procede a revocar la llave del cliente.
$PWD_ACTUAL/revoke-full $KEY_DIR/$1/$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment