linux nginx访问限制ip 脚本
时间:2020-02-08 14:56:25
收藏:0
阅读:71
for ((i=1;i<=10;i++)); do list_num = $(sed -n $i‘p‘ /tmp/ip.txt |awk ‘{print $1}‘) list_ip = $(sed -n $i‘p‘ /tmp/ip.txt |awk ‘{print $2}‘) if [ $list_num -gt 1000 ];then echo deny $list_ip‘;‘ >> /test/nginx_deny_ip.conf fi done
nginx -s reload
原文:https://www.cnblogs.com/kuku0223/p/12276034.html
评论(0)