Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Modification & Patches
  • Search

Limit connections per IP

Section with modification and patches for Vesta
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
scgc3333
Posts: 1
Joined: Wed Jun 14, 2017 2:57 pm

Limit connections per IP
  • Quote

Post by scgc3333 » Wed Jun 14, 2017 3:03 pm

Hi,

I have a VestaCP on Ubuntu. I am trying to achieve some sort of DOS protection. Before VestaCP, I've managed to do that with iptables and/or ufw. The problem now is that none of them work.

Here's what I do:

1. /sbin/iptables  -A INPUT -p tcp --syn --dport 443 -m connlimit --connlimit-above 50 -j REJECT
2. from another IP, I run ab -n 2700 -c 100 -k -H "Accept-Encoding: gzip, deflate" https://www.mydomain.tld/

Everything is down in seconds.

Can someone please tell me how can I achieve at least a minimum, decent DOS protection?

Cheers,
Bob
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Limit connections per IP
  • Quote

Post by skamasle » Mon Jun 19, 2017 9:14 pm

It will depend of how many conection you get per second

You can try with nginx will work very fine to 1000req/s or something more, also depends of your server capacity or your network

If not is a big DDOS and just some DOS, try with nginx rate limit module, you can limite conextions per IP in easy way

If you have VZ vps you will have problems with some iptables modules.
Top

jodumont
Posts: 26
Joined: Fri Jan 05, 2018 3:03 pm

Os: Debian 8x
Web: nginx + php-fpm
Re: Limit connections per IP
  • Quote

Post by jodumont » Mon Jan 08, 2018 4:14 pm

VestaCP works well with Cloudflare which will protect you for free on general attack such as basic dos
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Modification & Patches”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password