完了

Linux Script

Need to write a simple shell script ( Ubuntu/CentOS) that is ran using crontab, idea is to scan for number of connections per ip, if it exceeds specified limit, run command to block that IP in our firewall.

Functions:

1. run netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -n

2. scan number of connections and IP addresses

sample output:

2 [login to view URL]

2 [login to view URL]

3 [login to view URL]

5 [login to view URL]

5 [login to view URL]

5 [login to view URL]

6 [login to view URL]

6 [login to view URL]

8 [login to view URL]

9 0.0.0.0

10 [login to view URL]

12 [login to view URL]

22 [login to view URL]

22 [login to view URL]

24 [login to view URL]

24 [login to view URL]

60 [login to view URL]

370 [login to view URL]

450 [login to view URL]

Threshhold limit in conf is for ex 200 that means the last 2 ips should be blocked using command:

csf -d [login to view URL]

csf -d 450 175.137.180

use sendmail to email this event (only if block was done)

Must work without bugs/crashing/memory leaks etc, at end of script it must be terminated.

スキル: Linux, シェルスクリプト, C プログラミング, UNIX, Ubuntu

さらに表示: linux script mysql sync, dash linux script, linux script manager users, linux script error handling, linux script probleme, linux script replace string file, linux script update database, linux script imagemagick, html2pdf linux script, tag cloud script need script tag pictures, linux script backup lto, linux script transferring files sftp, linux script setting server, linux script download email attachments, read the numbers and decide what the next number should be 15 14 13 12 11 10 9

採用者について:
( 0件のレビュー ) Ajax, Canada

プロジェクトID: #21701231

アワード:

bindmission

Hello Hope you are doing well. I have 7 years of experience in Linux and shell scripting. I can handle this project. Regards VishnuLal*

$50 USD 1日以内
(117レビュー)
6.0

5人のフリーランサーが、このジョブに平均$92で入札しています

iridescent2x15

Hi I am software engineer and have done many programming and technical projects. Send me more details about your application so that we can negotiate the price accordingly. Thank you

$300 USD 7日以内
(41件のレビュー)
5.8
martini002

Hello, I'm a software engineer & linux sysadmin. I can do this, I used CSF before for DDoS attacks from haters, I lost my script but I can recreate it for you. It will work safetly but can't guarantee the memory and C もっと

$50 USD 7日以内
(7件のレビュー)
3.6
finest2019

I have read your proposal carefully. So I think my skill is suitable for your job. I have been working within this job for almost 9 years. I guarantee I will do it perfectly on time as an expert. thanks for your regard もっと

$30 USD 2日以内
(4件のレビュー)
2.9
wangxiangyu1231

Hi... I have read your brief and can understand your requirement. I am Linux script expert especially I worked as a firewall management developer on large company. I am sure I can complete your job definitely. Let's di もっと

$30 USD 7日以内
(レビュー1件)
1.7