How to prevent others from using scripts to attack the website?
How to prevent others from using scripts to attack the website?
There are many ways to attack websites. What you need is a behavioral firewall that can analyze traffic and even correlate traffic with business, rather than simply adding some scum prevention script to nginx.
What script? Which kind of attack?
Nginx is a Web Server and basically cannot prevent any attacks, but you can use the two modules limit_conn
and limit_req
to limit the number of requests per second per IP and the total number of requests per IP.
And you can install two firewalls, naxsi
and ngx_lua_waf
, but if you use well-known domestic VPS such as Alibaba Cloud and Chuangyu Cloud, then there will be anti-attack functions, and you can also use several domestic CDNs. Prevent attacks to a certain extent.
You can install the waf module or use third-party protection (such as Baidu Cloud, Accelerator, etc.)