This morning, I was awakened by an email. It's rare that we, an unpopular website, was attacked by DDOS
![](https://www.mengclaw.com/wp-content/uploads/2020/05/20200528094959.jpg)
In order to save the life of the website, I asked the magic conch tactfully, and the miraculous solutions of the pictures emerged one after another. However, the final point is nothing more than two methods - to access the CDN or to switch to a defensive server.
CDN, The full name content distribution network, relying on thousands of server clusters, can send requests back to the source nearby and clean attack traffic. It sounds like a wonderful solution. Take CloudFlare in the United States as an example. They provide a free plan package that allows users to spend the least cost and get very good protection effects. So I excitedly connected the website to CF and thought it was over, but who knows
![](https://www.mengclaw.com/wp-content/uploads/2020/05/20200528100423.jpg)
Hello? How to attack? I'm connected to CF's defense? I made a call to my good friend and found out that the reason was that the IP address had been exposed. I could only mend the situation if I went to CF again. The server is continuously empty routed, and the website cannot be opened now.
At present, there are only two ways before me:
1. Wait for the attack to stop
2. Change the IP address of the server and hide it behind the CF.
When the attack stops... I don't think it's reliable. The only alternative is to change the IP address of the server, and then put it behind the CF.
![](https://www.mengclaw.com/wp-content/uploads/2020/05/One-Hour-Later.jpg)
IP change! End! Yes! But after changing the IP address, CF gave me a blow with his shabby international links. It takes 20 seconds for the website to load and display normally
20 seconds!!!
Forget it. I'd better change to a slightly defensive server
I borrowed one from a friend. This time, the defense is available, but the configuration is a bit hard to explain
Alas... No more words. I squatted aside to wipe away my tears
Attachment: Server configuration of my current site
![](https://www.mengclaw.com/wp-content/uploads/2020/05/20200528131448.png)
![](https://www.mengclaw.com/wp-content/uploads/2020/05/20200528183642.png)