Add some scripts

This commit is contained in:
2021-10-21 15:03:43 -04:00
parent 9de1ec589d
commit 8c3cbbfc72
4 changed files with 47 additions and 0 deletions

15
script-user-unban Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Unbans a fail2ban IP
# Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1
is_root
[[ $# -lt 1 ]] && echo "Must provide an IP address" && exit 1
IPADDRESS="$1"
fail2ban-client set sshd unbanip "$IPADDRESS"
exit $?