跳至主要內容

Nginx封禁恶意IP

xw2022年3月8日小于 1 分钟NginxNginx

使用

http{
    # ....
    include blacklist.conf;
}
location / {
                proxy_pass http://lbs;
                proxy_redirect default;
}

blacklist.conf内容如下:

deny 127.0.0.1;

效果如下:

自动封禁