(Dec 29) New version 0.9.8-18 has been released

Limit connections per IP Topic is solved

Section with modification and patches for Vesta
Forum rules
Before creating a new topic or reply on the forum you should fill out additional fields "Os" and "Web" in your profile section.
In case of violation, the topic can be closed or response from the support will not be received.
Posts: 1
Joined: Wed Jun 14, 2017 2:57 pm

Limit connections per IP

Postby scgc3333 » Wed Jun 14, 2017 3:03 pm


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?


Posts: 384
Joined: Mon Feb 29, 2016 6:36 pm

Re: Limit connections per IP  Topic is solved

Postby 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.

Posts: 9
Joined: Fri Jan 05, 2018 3:03 pm

Os: Debian 9x
Web: nginx + php-fpm

Re: Limit connections per IP

Postby 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

Return to “Modification & Patches”

Who is online

Users browsing this forum: No registered users and 2 guests