Initial commit

This commit is contained in:
2024-11-04 18:39:37 -05:00
commit 5409b6d482
21 changed files with 1047 additions and 0 deletions

24
script-user-unban Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Unbans a fail2ban IP
# Copyright 2021 Bryan C. Roessler
parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f $parent/script-functions ]] && . "$parent"/script-functions || exit 1
is_root
echo "This script supports one optional argument, an IP address"
if [[ $# -eq 1 ]]; then
ip_address="$1"
else
prompt ip_address
fi
if fail2ban-client set sshd unbanip "$ip_address"; then
echo "IP address $ip_address unbanned"
fi
exit $?