View Single Post


Old
  Post #14 (permalink)   12-07-2005, 12:19 PM
imported_murat
HD Newbie
 
Join Date: Dec 2005
Posts: 3

Status: imported_murat is offline
Quote:
Originally Posted by prhost
The following is an extract from Ping! Zine if it's of any help to anyone :

Below you will find a simple SYN attack detection script that could be set to run every 5 minutes via a cronjob. In case of an attack you would receive and email with IP information; remember the IP information is usually spoofed.

Code:
#!/usr/bin/perl -w
#Simple Script to monitor syn attacks.
$syn_alert=15;
$hostname=`hostname`;
chomp($hostname);
$num_of_syn=`netstat -an | grep -c SYN`;
if($num_of_syn > $syn_alert)
{
`netstat -an | grep SYN | mail -s
?SYN ATTACK DETECTED ON
$hostname? admin\@yourcompany.com`;
}
else {
}
exit;
hello,

i am a starter and have a vps to run my forum,

how can i do this? is this a perl script, sorry for silly question but could you tell the way?

thanks...