diff --git a/allow_whitelist.sh b/allow_whitelist.sh index a3a9ea1..fadaaf8 100755 --- a/allow_whitelist.sh +++ b/allow_whitelist.sh @@ -243,7 +243,7 @@ echo "$ips" | while IFS= read -r line; do echo_pass "$ip 是私有地址, 忽略." else # 添加规则 - [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip\n" >>$log_path + [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip" >>$log_path if echo "$ip" | grep -q ":"; then echo_err "添加IPv6地址 $ip 到自定义链 $custom_chain_ipv6" [ "$DEBUG" -eq 0 ] && ip6tables -I $custom_chain_ipv6 -d $ip -j DROP diff --git a/block_blacklist.sh b/block_blacklist.sh index a03b9f8..bee85f1 100755 --- a/block_blacklist.sh +++ b/block_blacklist.sh @@ -201,7 +201,7 @@ echo "$block_clients" | while IFS= read -r client; do debug_echo "$ip 是私有地址, 忽略." else # 添加规则 - [ "$DEBUG" -eq 0 ] && echo -e "$client\t\t$ip\t\t$(date '+%Y-%m-%d %H:%M:%S')\n" >>$log_path + [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip" >>$log_path if echo "$ip" | grep -q ":"; then debug_echo "添加IPv6地址 $ip 到自定义链 $custom_chain_ipv6" [ "$DEBUG" -eq 0 ] && ip6tables -I $custom_chain_ipv6 -d $ip -j DROP