mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-26 11:45:37 -05:00
Filter out my IP from being added to reject list
This commit is contained in:
parent
6f0dc39606
commit
76780787a9
@ -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