mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-27 04:15:38 -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
|
# Populate the UFW reject rule with the IP addresses collected from the kernel log
|
||||||
while IFS= read -r ip
|
while IFS= read -r ip
|
||||||
do
|
do
|
||||||
|
ip_prefix="${ip%.*}"
|
||||||
# Check if the IP is already in the UFW rules
|
# 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
|
then
|
||||||
ufw reject from $ip
|
ufw reject from $ip
|
||||||
# Increment the counter
|
# Increment the counter
|
||||||
|
Loading…
Reference in New Issue
Block a user