♛AwesomeWorld♛ - Di Nuovo Online! - NESSUN RESETTT!!! DOVETE RECUPERARE PSW ACCOUNT!!! - {Server De

Offline 
Stato
Discussione chiusa ad ulteriori risposte.
Ragazzi sto facendo il possibile, devo fermare il ddos...
 
downloads.phpnuke.org/it/download-item-view-y-y-g-b-g-b/D-GUARD%2BANTI-DDOS%2BFIREWALL.htm
raga ho trovato un firewall anti ddos non so se è buono vedete
 



  1. #!/bin/sh
  2. MAX_CONN=90
  3. mkdir /tmp/itcforce
  4. TMP_PREFISSO='/tmp/itcforce'
  5. TMP_FILE='ip-abusi'
  6. netstat -ntu -f inet| awk '{if(NR>2 && NF=6) print $5}' | cut -d. -f1-4 | grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' | sort | uniq -c | sort -nr > $TMP_FILE
  7. while read line; do
  8. COR_LINEA_CONN=$(echo $line | cut -d" " -f1)
  9. COR_LINEA_IP=$(echo $line | cut -d" " -f2)
  10. if [ $COR_LINEA_CONN -lt $MAX_CONN ]; then
  11. break
  12. fi
  13. echo $COR_LINEA_IP > $TMP_PREFISSO/abusi
  14. awk '{$1="/sbin/route add -net "$0}1{$2=" 127.0.0.1 -blackhole"}2' $TMP_PREFISSO/abusi > $TMP_PREFISSO/nullr.sh ; sh $TMP_PREFISSO/nullr.sh
  15. done < $TMP_FILE
  16. rm -rf $TMP_PREFISSO


DoS-Netstat-NullRouting.sh (188)
Definite la variabile MAX_CONN= per bloccare solo gli ip con più di quelle connessioni. Di default è impostato a 90. Quindi quando si avvia questo script, bloccherà solo gli IP che hanno più di 90 connessioni.
Per usare questo script, salvatelo in una directory a piacere, date i permessi per l’esecuzione e avviatelo.
[TABLE="width: 100%"]
[TR]
[TD="width: 80%, align: left"][/TD]
[TD="align: right"] [/TD]
[/TR]
[/TABLE]


chmod +x 755 dos-netstat-nullrouting.shsh ./dos-netstat-nullrouting.sh


Visto che questo script non chiede nessuna variabile quando è in esecuzione, potete metterlo in cronjob e farlo avviare automaticamente ogni quante ore volete.


 
Stato
Discussione chiusa ad ulteriori risposte.
Indietro
Top Bottom