Get Paid to Participate - up to $1 per post!     Twitter     Facebook
Hosting Discussion
 

Hosting Discussion > Web Hosting Forums > Hardware and Server Configuration > How to limit connections per ip with csf
forgot password?



FORUM SUPPORTERS:

Reply


Old
  Post #1 (permalink)   01-14-2019, 04:14 PM
HD Newbie
 
Join Date: Apr 2012
Posts: 10
Send a message via MSN to el5olfaa.com

Status: el5olfaa.com is offline
Hello,

I will explain to you today how to block any ip address if exceeded our limitations, this is would be useful to prevent small ddos attack from affecting your server performance .

Assume you already having csf installed and running :

1) Connect to your server shell and do the following command :
Code:
nano /etc/csf/csf.conf
2) Search for "CT_LIMIT" and set its value to 150 or as you see its good for your environment but keep in mind if you set it too low not suitable to your work you will see too many false positives .

3) Overwrite file and close then do the following command to restart csf to apply our new configuration :
Code:
csf -r
That's all

Good luck
__________________
El5olfaa Webhosting - Your Trust Our priority
Web Hosting | Reseller Hosting | VPS Hosting | Dedicated Servers
█ 24/7 Technical Support | 99.9% Uptime Guarantee | Advanced Management | DDOS Protection
 
 
 


Old
  Post #2 (permalink)   02-06-2019, 05:44 AM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 687

Status: ughosting is offline
Realistically if a single IP (non-customer) has 150 connections, there is an issue.
You would be better with a lower number.

If you are trying to stop an DDoS, there are a number of better options available in CSF.

Like:-

CONNLIMIT, which configures how many connections per port can be made, which offers better granularity than CT_LIMIT.

even better for DoS/DDoS is:-

PORTFLOOD, which configures how many connections per second per port to accept and how long to back off for it that limit is breached.

Don't forget the SYNFLOOD and UDPFLOOD either, whilst ideally these should be left switched off if you are not under-attack, you can switch these on to defend against these attacks automatically.
__________________
Cloud Consultants
 
 
 


Old
  Post #3 (permalink)   02-28-2019, 08:59 AM
HD Newbie
 
Join Date: Feb 2019
Posts: 7

Status: Baniwell is offline
Useful manual, especially when bots or spammers attack.
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: