This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15016|Reply: 0

[linux] In linux, Iptables restricts the same IP connection to prevent CC attacks

[Copy link]
Posted on 7/9/2016 10:09:05 PM | | |
This article will introduce you to the method of restricting the same IP connection to prevent CC/DDOS attacks from Iptables in linux, this is only the most based prevention method, if the real attack we still need hardware to prevent it.
1. The maximum number of IP connections connected to port 80 is 10, which can be customized and modified. (Maximum connection per IP)

service iptables save
service iptables restart


The above two effects are the same, it is recommended to use the first one,


iptables, a firewall tool, I believe that almost all O&M friends use it. As we all know, iptables has three ways to handle incoming packets, namely ACCEPT, DROP, REJECT. ACCEPT is easy to understand, but what is the difference between REJECT and DROP? One day I heard Sery's explanation and felt that it was easy to understand:

"It's like a liar calling you,drop is to reject it directly. If you reject, it is equivalent to you calling back the scammer.

In fact, many people have asked this question since a long time ago about whether to use DROP or REJECT. REJECT actually returns one more ICMP error message package than DROP, and the two strategies have their own advantages and disadvantages, which can be summarized as follows:

DROP is better than REJECT in terms of resource savings, and slowing down the progress of the hack (because it does not return any information about the server to the hacker); The bad thing is that it is easy to make it difficult to troubleshoot network problems of enterprises, and it is easy to exhaust all bandwidth in the event of a DDoS attack.






Previous:Using 360 Website Defender TTFB for too long
Next:Write to you who attack the website, it's boring!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com