Tamamlanmış

Linux Script custom

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.

Beceriler: C Programlama, Linux, Kabuk Betiği, Ubuntu, UNIX

Daha fazlasını gör: linux script mysql sync, tell friend script custom, 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, linux script backup lto, linux script transferring files sftp, read the numbers and decide what the next number should be 15 14 13 12 11 10 9

İşveren Hakkında:
( 1 değerlendirme ) Ajax, Canada

Proje NO: #21796058

Seçilen:

kaloyan13

Master in Bash scripting. Can finish your script in 30 minutes. Thank you......................................

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(432 Değerlendirme)
7.2

Bu iş için 5 freelancer ortalamada $28 teklif veriyor

liujianmin

Hi, Glad to apply to your offer. I have gone through your job description in depth, and now I am sure that I can develop what you want exactly to your expectations, OR more. I have been through many frameworks that bo Daha Fazla

$30 USD in 7 gün içinde
(3 Değerlendirme)
1.2
victoryfive1990

Hello. Fast and accurate result will be delivered on time. I am experienced working with the project as you suggest and I think I can complete your work on time. Now I am fully avaliable for your project and for your t Daha Fazla

$30 USD in 7 gün içinde
(0 Değerlendirme)
0.0
Artemrodin1987

Hello, I have just read your requirement very careful and I am sure that I can finish it for 1 hours because I am a professional C/C++ expert. Now I don't have even one review because I am a new freelancer. So I think Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
guoming1988

Hi, sir. I have many experiences with Python, C/C++ langeuages for 15 years. And I think your project is not so difficult work for me. If you want work with me, you’ll see satisfactory results. I am looking forward to Daha Fazla

$30 USD in 7 gün içinde
(0 Değerlendirme)
0.0