mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 20:30:58 -05:00
Filter out my IP from being added to reject list
This commit is contained in:
parent
bf934f2f53
commit
3ff70e9236
@ -17,8 +17,9 @@ new_ips=0
|
||||
# Populate the UFW reject rule with the IP addresses collected from the kernel log
|
||||
while IFS= read -r ip
|
||||
do
|
||||
ip_prefix="${ip%.*}"
|
||||
# Check if the IP is already in the UFW rules
|
||||
if ! ufw status | grep -q "$ip"
|
||||
if ! ufw status | grep -q "$ip" && [ "$ip_prefix" != "${TOAST_IP%.*}" ]
|
||||
then
|
||||
ufw reject from $ip
|
||||
# Increment the counter
|
||||
|
Loading…
Reference in New Issue
Block a user