Linux command to prevent dos attack by using netstat and iptables. I want to DROP more than 200 requests per ip to prevent ddos attack. This is command that i used to detect requests count per ip: now i want add all ip addresses that made more than 200 requests into IPtables to DROP input and out put.
Posted by5 years ago
![Detect Detect](/uploads/1/2/5/0/125001598/326988586.jpg)
Archived
When it comes to protecting your server from a DOS attack, what method(s) does everyone use?
- Configuring iptables/ufw/etc to handle everything?
- Allow software such as CSF (ConfigServer Security & Firewall)/(D)DoS Deflate/APF+AntiDOS/etc to do all of the dirty work?
- Hardware that sits in front of your server that handles everything automatically?
- Something else?
- Nothing?
- No idea?
My concern is to do with attacks such as DOS attacks rather than security (SSH, application, etc). At the moment I use CSF and it seems fine, but I've never actually experienced a DOS attack to know how well it holds up. I'm hosted on AWS so the network can surely handle it (I would hope), and my application has caching, a reverse proxy and minimizes the number of requests that need to be processed, so that should be fine too.
Has anyone ever experienced a (D)DOS attack? If so, how well did your server hold up? What steps did you take to solve it? Has it happened again and how well did things hold up with your solution in place?
Any help would be very much appreciated. Thanks! :)
![Ddos Ddos](/uploads/1/2/5/0/125001598/521658312.png)
46 comments