script request to block ips with over 100 connections if server load 1 minute is over 7

Completed Posted 3 years ago Paid on delivery
Completed Paid on delivery

Hello,

My dedicated server is Centos 7 running cPanel. I currently have Mod_Security and CSF/LFD installed; however, it takes too long for CSL/LFD to block IP addresses that have over 100 connections to the server and causing a massive server load.

What I need is a custom script that will block ips with over 100 connections (variable adjustable) if server load 1 minute is over 7 (variable adjustable) . I envision the following...

- create a script to monitor server loads. set up a cron to check the server load every 30 seconds and if the load for the 1 minute is over 7, then perform the following command and block the IPs with over 100 connections to the server, using CSF/LFD...

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

I will not let you have access to the server, so I hope you have your own server to implement the above request.

Thank you,

Ross

Linux Shell Script PHP System Admin Ubuntu

Project ID: #28332413

About the project

3 proposals Remote project Active 3 years ago

Awarded to:

mrkimoz

Hello, i can help you dear with excellent experience for bash script, i can provide you with request script that provide you what you need, please contact me and i have my own server for testing Thanks

$40 CAD in 1 day
(3 Reviews)
1.1

3 freelancers are bidding on average $33 for this job

udayarpandey2022

I can do this job. I have the experience and ability required to perform this task. Let me know if you are interested. Thanks!

$30 CAD in 2 days
(51 Reviews)
4.9
gattes

Hi there, I have over 10 years of work experience with Linux and I think I can help you with this. Ping me and I'll do so. Cheers mate.

$30 CAD in 1 day
(10 Reviews)
2.8