s
This commit is contained in:
parent
9ca6b48c99
commit
67e73a8a8c
13
firewall.sh
13
firewall.sh
@ -6,6 +6,7 @@ NGINX_ACCESS="/tmp/access.log"
|
||||
ACCESS="/tmp/minute.log"
|
||||
HTTP_LIMIT="100"
|
||||
RATE_LIMITED_HTTP="30"
|
||||
MODULES="/opt/firewall/modules"
|
||||
grep $DATE $NGINX_ACCESS >$ACCESS
|
||||
#Firewall Port Configuration
|
||||
#
|
||||
@ -306,16 +307,6 @@ forgive() {
|
||||
rateLimit $HTTP_LIMIT
|
||||
}
|
||||
|
||||
module-go() {
|
||||
ATTACK="module-go DDOS Attack "
|
||||
GO_SPAM=$(grep $2 $ACCESS | grep -E "Go-http-client" | wc -l)
|
||||
if [[ "$GO_SPAM" -gt 10 ]]; then
|
||||
ipBlockParser "$1"
|
||||
redis-cli SADD tmp_block $1
|
||||
message "$ATTACK $1"
|
||||
fi
|
||||
}
|
||||
|
||||
module-akkoma-accounts() {
|
||||
ATTACK="module-akkoma-accounts DDOS Attack "
|
||||
SEARCH_SPAM=$(grep $2 $ACCESS | grep "api/v1/accounts" | grep $1 | wc -l)
|
||||
@ -444,7 +435,7 @@ watch() {
|
||||
module-akkoma-search "$i" "$DATE"
|
||||
module-lightning "$i" "$DATE"
|
||||
module-php "$i" "$DATE"
|
||||
module-go "$i" "$DATE"
|
||||
bash $MODULES/modules/module-go.sh "$i" "$DATE"
|
||||
module-get-spam "$i" "$DATE"
|
||||
|
||||
COUNT=$(grep $DATE $ACCESS | grep $i | grep -Fivf <(printf '%s\n' "${SAFE_TRAFFIC[@]}") | grep -Fivf <(printf '%s\n' "${SAVED_BOTS[@]}") | wc -l)
|
||||
|
Loading…
Reference in New Issue
Block a user