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

Đã hoàn thành Đã đăng vào 3 năm trước Thanh toán khi bàn giao
Đã hoàn thành Thanh toán khi bàn giao

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 Quản trị hệ thống Ubuntu

ID dự án: #28332413

Về dự án

3 đề xuất Dự án từ xa 3 năm trước đang mở

Được trao cho:

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 trong 1 ngày
(3 Đánh Giá)
1.1

3 freelancer chào giá trung bình$33 cho công việc này

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 trong 2 ngày
(51 Nhận xét)
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 trong 1 ngày
(10 Nhận xét)
2.8