Record IP address in F2B_ACTIVE_BANS instead of the network block

This commit is contained in:
naudster 2022-09-21 11:48:27 +10:00
parent 15f2c4c769
commit 73f15137d2
1 changed files with 8 additions and 8 deletions

View File

@ -206,7 +206,7 @@ def ban(address):
rule.target = target
if rule not in chain.rules:
chain.insert_rule(rule)
r.hset('F2B_ACTIVE_BANS', '%s' % net, cur_time + BAN_TIME)
r.hset('F2B_ACTIVE_BANS', '%s' % address, cur_time + BAN_TIME)
else:
logWarn('%d more attempts in the next %d seconds until %s is banned' % (MAX_ATTEMPTS - bans[net]['attempts'], RETRY_WINDOW, net))