Virtual Server von Hosteurope unter DDoS, was soll ich machen?

Guten morgen

mein VServer ist in letzter Zeit immer wieder offline und muss den immer wieder neustarten. Ich habe ein Linux Virtual Server bei hosteurope. Wie finde ich die IP Adressen vom Angreifer und wie kann ich sie sperren??

Danke

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Profile picture for user Guest
Permanenter Link

Hey,

Die IP Adressen von dem Angreifer bekommst du entweder über netstat. (Das Tool zeigt dir die aktuellen Verbindungen)

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n 1 x.171.224.117 1 x.171.224.118 1 x.185.37.228 1 x.190.9.89 5 x.55.213.68 5 x.155.223.251 6 x.200.5.183 9 x.233.103.37 9 x.50.66.112 10 x.130.88.227

Mit awk kannst du dir alle IP Adressen von heute anzeigen, die einen Anfrage an deinen Server gestellt haben.
awk '/May\/2013/ {print $1};' /var/www/vhosts/DEINE-SEITE.DE/statistics/logs/access_log | sort | uniq -c | sort -rn | head -n 100

2514 x.7.216.178
367 x.55.213.68
255 x.247.249.87
200 x.173.251.219
196 x.0.47.67
188 x.69.113.2
182 x.50.66.112
153 x.228.20.186
137 x.91.245.85

Mit IPTables kannst du die IP Adresse 123.456.789.123 sperren.
iptables -I INPUT -s 123.456.789.123 -j DROP

Profile picture for user Guest
Permanenter Link

Ein anderer Ansatz wäre fail2ban zu installieren:

apt-get install fail2ban

In die /etc/fail2ban/jail.conf Datei folgendes hinzufügen:

[http-get-dos] enabled = true port = http,https filter = http-get-dos logpath = /var/www/vhosts/DEINE-SEITE/statistics/logs/access_log maxretry = 300 findtime = 120 bantime = 84600 action = iptables[name=HTTP, port=http, protocol=tcp]

Die IP wird für 24 Stunden gebannt, falls sie in 120 Sekunden 300 Anfragen sendet.

Man muss noch einen Filter erstelen. Dazu folgende Datei anlegen:
/etc/fail2ban/filter.d/http-get-dos.conf

[Definition]

failregex = ^ -.*GET
ignoreregex =

Der Filter matched alle GET Anfragen, hier könnte man mit Regulären Ausdrücken die Anfrage spezifizieren.

Suche

Neueste Kommentare

  • 7 hours 44 minutes ago
    Warning: Undefined array key "url" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()
    Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() 
  • 2 days 8 hours ago
    Server install & config : Debian 12 + Plesk + Apache + nginx + MariaDB + Solr
    sudo timedatectl set-timezone Europe/Berlin
  • 1 week 2 days ago
    Warning: PHP Startup: Unable to load dynamic library 'apcu.so' ... cannot open shared object file: No such file or directory

    Try this:

  • 3 weeks 1 day ago
    List Cronjobs for all users (via for + crontab)

    Alternative (without warnings like "no crontab for dovecot") to see all tasks:

  • 2 weeks 6 days ago
    Install APCu (PHP 8.1, Plesk)

    php 8.3 apcu failed

    über Plesk hat es geklappt.

     

  • 2 weeks 6 days ago
    Install APCu (PHP 8.1, Plesk)

     

    install:

    # sudo apt install php-dev
    
  • 2 weeks 6 days ago
    pecl install apcu : phpize: not found / ERROR: `phpize' failed

    phpize

    # sudo apt install php-dev
    

     

    details

  • 2 weeks 6 days ago
    Install APCu (PHP 8.1, Plesk)

    Problem:

  • 2 months 1 week ago
    Install APCu (PHP 8.1, Plesk)

    Problem:

  • 3 months 1 week ago
    Linux mv: das Verschieben von 'new' nach 'old' ist nicht möglich: Das Verzeichnis ist nicht leer

    Hilft "cp -avf old new && rm -rvf old" nicht?