Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2590 connectés 

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Infrastructures serveurs

  Plantage serveur dédiés OVH

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Plantage serveur dédiés OVH

n°115638
mechkurt
Posté le 28-10-2013 à 09:34:55  profilanswer
 

Bonjour,
Mon dédiés est tombé dans la nuit de samedi à dimanche (avant ou pendant la sauvegarde de la nuit malheureusement).
D'après mes données analytics, le serveur serait tombé pendant le rsync de backup, est ce que le changement d'heure pourrait être responsable ?
Dans la mesure où je n’arrives plus à me connecter en SSH (login failed), je penses aussi avoir peut être été hacké…
J’ai passé hier la machine en mode rescue pour l’empêcher de nuire mais je ne sais pas quoi faire de plus.
Avant de réinstaller le système et de repartir à vendredi, j’aurais voulu savoir quelles étaient mes options.
Mon cœur de métier étant le graphisme, la communication et le webdesign, je serais à la recherche de solutions d’infogérance « tout compris ».
Une espèce de mutualisé XXL, ce dédiés ayant été acquis pour héberger un Magento, qui bien sûr ne saurait tourner sur les offres mutualisés d’OVH…


---------------
D3
mood
Publicité
Posté le 28-10-2013 à 09:34:55  profilanswer
 

n°115641
mechkurt
Posté le 28-10-2013 à 10:04:34  profilanswer
 

Je vais essayer de remonter les disque en mode rescue pour voir les logs...
 
Voila ce que me donne un fdisk -l

Code :
  1. WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn                      't support GPT. Use GNU Parted.
  2. Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
  3. 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
  4. Units = sectors of 1 * 512 = 512 bytes
  5. Sector size (logical/physical): 512 bytes / 4096 bytes
  6. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  7. Disk identifier: 0x00000000
  8.    Device Boot      Start         End      Blocks   Id  System
  9. /dev/sda1               1  3907029167  1953514583+  ee  GPT
  10. Partition 1 does not start on physical sector boundary.
  11. WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn                      't support GPT. Use GNU Parted.
  12. Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
  13. 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
  14. Units = sectors of 1 * 512 = 512 bytes
  15. Sector size (logical/physical): 512 bytes / 4096 bytes
  16. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  17. Disk identifier: 0x00000000
  18.    Device Boot      Start         End      Blocks   Id  System
  19. /dev/sdb1               1  3907029167  1953514583+  ee  GPT
  20. Partition 1 does not start on physical sector boundary.
  21. Disk /dev/md2: 1978.4 GB, 1978380779520 bytes
  22. 2 heads, 4 sectors/track, 483003120 cylinders, total 3864024960 sectors
  23. Units = sectors of 1 * 512 = 512 bytes
  24. Sector size (logical/physical): 512 bytes / 4096 bytes
  25. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  26. Alignment offset: 3584 bytes
  27. Disk identifier: 0x00000000
  28. Disk /dev/md2 doesn't contain a valid partition table
  29. Disk /dev/md1: 21.5 GB, 21474770944 bytes
  30. 2 heads, 4 sectors/track, 5242864 cylinders, total 41942912 sectors
  31. Units = sectors of 1 * 512 = 512 bytes
  32. Sector size (logical/physical): 512 bytes / 4096 bytes
  33. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  34. Disk identifier: 0x00000000
  35. Disk /dev/md1 doesn't contain a valid partition table


 
http://guides.ovh.com/ModeRescue
Si je m'en tiens à doc, je doit remonter en 1er la partition qui as une étoile, sauf que je n'ai pas de partition (surement un truc de raid software ou je ne sais pas trop quoi), donc c'est quoi la prochaine étape ?


---------------
D3
n°115643
Plam
Bear Metal
Posté le 28-10-2013 à 10:10:26  profilanswer
 

Monter /dev/md1 qui doit être ta partoche système (tu te souviens de la taille de tes partitions avant ton soucis ?)

 

T'en a deux en raid soft : md1 et md2 (respectivement 21.5Go et ~ 2To)


Message édité par Plam le 28-10-2013 à 10:11:09

---------------
Spécialiste du bear metal
n°115644
mechkurt
Posté le 28-10-2013 à 10:23:24  profilanswer
 

Ok j'ai suivis le tuto et remonter md1 dans mnt, md2 dans mnt/var et chroot mnt
 
Je suis dans le dossier logs, comment je peux voir les dernier accès SSH, ou les erreurs pertinentes au vu de mon poroblème ?
 
PS: merci pour ton aide ! ^^


---------------
D3
n°115645
mechkurt
Posté le 28-10-2013 à 10:28:34  profilanswer
 

Bon entre 3 H et 3H 30 j'ai énormément de :

Code :
  1. Oct 27 03:07:00 ns3299532 sshd[12509]: Failed password for root from 94.23.121.30 port 60770 ssh2
  2. Oct 27 03:07:00 ns3299532 sshd[12510]: Received disconnect from 94.23.121.30: 11: Bye Bye
  3. Oct 27 03:07:00 ns3299532 sshd[12732]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30  user=root


 
L'adresse IP semble celle d'une machine OVH http://www.ip-adress.com/reverse_ip/94.23.121.30
 
Faut croire que mon Fail2ban était mal configuré ! :- /


---------------
D3
n°115646
mechkurt
Posté le 28-10-2013 à 10:32:16  profilanswer
 

Dans la log précédente j'ai des trucs zarb comme :

Code :
  1. Oct 27 03:06:41 ns3299532 sshd[11496]: Failed password for invalid user testuser from 94.23.121.30 port 60148 ssh2
  2. Oct 27 03:06:41 ns3299532 sshd[11497]: Received disconnect from 94.23.121.30: 11: Bye Bye
  3. Oct 27 03:06:41 ns3299532 sshd[11524]: Invalid user web0 from 94.23.121.30
  4. Oct 27 03:06:41 ns3299532 sshd[11525]: input_userauth_request: invalid user web0
  5. Oct 27 03:06:41 ns3299532 sshd[11524]: pam_unix(sshd:auth): check pass; user unknown
  6. Oct 27 03:06:41 ns3299532 sshd[11524]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30
  7. Oct 27 03:06:41 ns3299532 sshd[11524]: pam_succeed_if(sshd:auth): error retrieving information about user web0
  8. Oct 27 03:06:42 ns3299532 sshd[11524]: Failed password for invalid user web0 from 94.23.121.30 port 60199 ssh2
  9. Oct 27 03:06:42 ns3299532 sshd[11525]: Received disconnect from 94.23.121.30: 11: Bye Bye
  10. Oct 27 03:06:43 ns3299532 sshd[11555]: Invalid user svn from 94.23.121.30
  11. Oct 27 03:06:43 ns3299532 sshd[11556]: input_userauth_request: invalid user svn
  12. Oct 27 03:06:43 ns3299532 sshd[11555]: pam_unix(sshd:auth): check pass; user unknown
  13. Oct 27 03:06:43 ns3299532 sshd[11555]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30
  14. Oct 27 03:06:43 ns3299532 sshd[11555]: pam_succeed_if(sshd:auth): error retrieving information about user svn
  15. Oct 27 03:06:44 ns3299532 sshd[11555]: Failed password for invalid user svn from 94.23.121.30 port 60253 ssh2
  16. Oct 27 03:06:44 ns3299532 sshd[11556]: Received disconnect from 94.23.121.30: 11: Bye Bye
  17. Oct 27 03:06:44 ns3299532 sshd[11591]: Invalid user svn from 94.23.121.30
  18. Oct 27 03:06:44 ns3299532 sshd[11592]: input_userauth_request: invalid user svn
  19. Oct 27 03:06:44 ns3299532 sshd[11591]: pam_unix(sshd:auth): check pass; user unknown
  20. Oct 27 03:06:44 ns3299532 sshd[11591]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30
  21. Oct 27 03:06:44 ns3299532 sshd[11591]: pam_succeed_if(sshd:auth): error retrieving information about user svn
  22. Oct 27 03:06:46 ns3299532 su: PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: cannot open shared object file: No such file or directory
  23. Oct 27 03:06:46 ns3299532 su: PAM adding faulty module: /lib64/security/pam_fprintd.so
  24. Oct 27 03:06:46 ns3299532 su: pam_unix(su-l:session): session opened for user popuser by (uid=0)
  25. Oct 27 03:06:46 ns3299532 sshd[11591]: Failed password for invalid user svn from 94.23.121.30 port 60312 ssh2
  26. Oct 27 03:06:46 ns3299532 sshd[11592]: Received disconnect from 94.23.121.30: 11: Bye Bye
  27. Oct 27 03:06:46 ns3299532 sshd[11940]: Invalid user svn from 94.23.121.30
  28. Oct 27 03:06:46 ns3299532 sshd[11941]: input_userauth_request: invalid user svn
  29. Oct 27 03:06:46 ns3299532 sshd[11940]: pam_unix(sshd:auth): check pass; user unknown
  30. Oct 27 03:06:46 ns3299532 sshd[11940]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30
  31. Oct 27 03:06:46 ns3299532 sshd[11940]: pam_succeed_if(sshd:auth): error retrieving information about user svn
  32. Oct 27 03:06:47 ns3299532 su: pam_unix(su-l:session): session closed for user popuser
  33. Oct 27 03:06:47 ns3299532 su: PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: cannot open shared object file: No such file or directory
  34. Oct 27 03:06:47 ns3299532 su: PAM adding faulty module: /lib64/security/pam_fprintd.so
  35. Oct 27 03:06:47 ns3299532 su: pam_unix(su-l:session): session opened for user popuser by (uid=0)
  36. Oct 27 03:06:48 ns3299532 su: pam_unix(su-l:session): session closed for user popuser
  37. Oct 27 03:06:48 ns3299532 su: PAM unable to dlopen(/lib64/security/pam_fprintd.so): /lib64/security/pam_fprintd.so: cannot open shared object file: No such file or directory
  38. Oct 27 03:06:48 ns3299532 su: PAM adding faulty module: /lib64/security/pam_fprintd.so
  39. Oct 27 03:06:48 ns3299532 su: pam_unix(su-l:session): session opened for user popuser by (uid=0)


 
Le mec cherche une faille dans centos ou dans plesk ?
On part du principe qu'il a trouvé ou il a juste planté le système ?


Message édité par mechkurt le 28-10-2013 à 10:33:37

---------------
D3
n°115647
Plam
Bear Metal
Posté le 28-10-2013 à 10:32:23  profilanswer
 

mechkurt a écrit :

Ok j'ai suivis le tuto et remonter md1 dans mnt, md2 dans mnt/var et chroot mnt
 
Je suis dans le dossier logs, comment je peux voir les dernier accès SSH, ou les erreurs pertinentes au vu de mon poroblème ?
 
PS: merci pour ton aide ! ^^


 
var/log/auth.log
 
Regarde aussi le syslog
 

mechkurt a écrit :

Bon entre 3 H et 3H 30 j'ai énormément de :

Code :
  1. Oct 27 03:07:00 ns3299532 sshd[12509]: Failed password for root from 94.23.121.30 port 60770 ssh2
  2. Oct 27 03:07:00 ns3299532 sshd[12510]: Received disconnect from 94.23.121.30: 11: Bye Bye
  3. Oct 27 03:07:00 ns3299532 sshd[12732]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=94.23.121.30  user=root


 
L'adresse IP semble celle d'une machine OVH http://www.ip-adress.com/reverse_ip/94.23.121.30
 
Faut croire que mon Fail2ban était mal configuré ! :- /


 
Arf en effet. 3 tentatives c'est un bon compromis je trouve :)


---------------
Spécialiste du bear metal
n°115648
Plam
Bear Metal
Posté le 28-10-2013 à 10:35:06  profilanswer
 

Check ton /etc/fail2ban/jail.conf :
 

Citation :

[ssh]
 
enabled  = true
port     = ssh
filter   = sshd
logpath  = /var/log/auth.log
maxretry = 3


---------------
Spécialiste du bear metal
n°115649
mechkurt
Posté le 28-10-2013 à 10:36:15  profilanswer
 

Je n'ai pas de auth.log ni de syslog, il les as supprimés pour couvrir ces traces ?
 

Code :
  1. [root@rescue log]# ls -l
  2. total 75496
  3. drwxr-xr-x 2 apache       apache           4096  1 févr.  2013 atmail
  4. drwxr-x--- 2 root         root             4096  1 févr.  2013 audit
  5. -rw------- 1 root         root                0  1 févr.  2013 boot.log
  6. -rw------- 1 root         utmp         17707008 27 oct.  03:31 btmp
  7. -rw------- 1 root         utmp         15013632 30 sept. 23:41 btmp-20131001
  8. -rw------- 1 root         root             5050 27 oct.  03:31 cron
  9. -rw------- 1 root         root          1825057  6 oct.  03:47 cron-20131006
  10. -rw------- 1 root         root          1812166 13 oct.  03:13 cron-20131013
  11. -rw------- 1 root         root          1821328 20 oct.  03:31 cron-20131020
  12. -rw------- 1 root         root          1824489 27 oct.  03:06 cron-20131027
  13. -rw-r--r-- 1 root         root            34339  1 févr.  2013 dmesg
  14. -rw-r--r-- 1 root         root            34339  1 févr.  2013 dmesg.old
  15. -rw-r--r-- 1 root         root           325132  2 sept. 09:21 dracut.log
  16. -rw-r--r-- 1 drweb        drweb          137260 26 oct.  18:30 drwebupdate.log
  17. drwxrwx--- 3 hspc         hspc             4096  1 févr.  2013 hspc
  18. drwx------ 2 root         root             4096 27 oct.  03:06 httpd
  19. -rw-r--r-- 1 root         root            14550  1 févr.  2013 install_rtm.log
  20. -rw-r--r-- 1 root         root          2920584 26 sept. 10:50 lastlog
  21. -rw------- 1 root         root                0 27 oct.  03:06 maillog
  22. -rw------- 1 root         root                0 29 sept. 03:07 maillog-20131006
  23. -rw------- 1 root         root                0  6 oct.  03:47 maillog-20131013
  24. -rw------- 1 root         root                0 13 oct.  03:13 maillog-20131020
  25. -rw------- 1 root         root                0 20 oct.  03:31 maillog-20131027
  26. drwxrwsr-x 2 root         mailman          4096 27 oct.  03:06 mailman
  27. -rw------- 1 root         root             2968 27 oct.  03:30 messages
  28. -rw------- 1 root         root          5186605  6 oct.  03:05 messages-20131006
  29. -rw------- 1 root         root          4236139 13 oct.  03:05 messages-20131013
  30. -rw------- 1 root         root          4572040 20 oct.  03:30 messages-20131020
  31. -rw------- 1 root         root          3993442 27 oct.  03:05 messages-20131027
  32. -rw-r----- 1 mysql        mysql           20956 15 oct.  00:25 mysqld.log
  33. drwxr-xr-x 2 ntp          ntp              4096 22 févr.  2013 ntpstats
  34. drwxr-x--- 2 apache       apache           4096  1 févr.  2013 psa-horde
  35. -rw-r--r-- 1 root         root             1843 20 oct.  03:31 sa-update.log
  36. -rw-r--r-- 1 root         root             2813  1 juil. 03:34 sa-update.log-20130701
  37. -rw-r--r-- 1 root         root             2231  1 août  03:24 sa-update.log-20130801
  38. -rw-r--r-- 1 root         root             3007  1 sept. 03:34 sa-update.log-20130901
  39. -rw-r--r-- 1 root         root             2910  1 oct.  03:33 sa-update.log-20131001
  40. -rw------- 1 root         root           249176 27 oct.  03:31 secure
  41. -rw------- 1 root         root          5190507  6 oct.  03:47 secure-20131006
  42. -rw------- 1 root         root          5074239 13 oct.  03:13 secure-20131013
  43. -rw------- 1 root         root          2403729 20 oct.  03:31 secure-20131020
  44. -rw------- 1 root         root          5007256 27 oct.  03:06 secure-20131027
  45. -rw------- 1 root         root                0 27 oct.  03:06 spooler
  46. -rw------- 1 root         root                0 29 sept. 03:07 spooler-20131006
  47. -rw------- 1 root         root                0  6 oct.  03:47 spooler-20131013
  48. -rw------- 1 root         root                0 13 oct.  03:13 spooler-20131020
  49. -rw------- 1 root         root                0 20 oct.  03:31 spooler-20131027
  50. drwxr-x--- 2 sso          root             4096 27 oct.  03:06 sso
  51. drwx------ 2 sw-cp-server sw-cp-server     4096 20 oct.  03:30 sw-cp-server
  52. -rw------- 1 root         root                0 10 juil.  2011 tallylog
  53. -rw-rw-r-- 1 root         utmp           536832 25 oct.  20:18 wtmp
  54. -rw------- 1 root         root            39436 26 sept. 10:52 yum.log


---------------
D3
n°115650
Plam
Bear Metal
Posté le 28-10-2013 à 10:37:29  profilanswer
 

T'es sous CentOS on dirait, c'est normal :D
 
Je parlais pour Debian :o


Message édité par Plam le 28-10-2013 à 10:38:37

---------------
Spécialiste du bear metal
mood
Publicité
Posté le 28-10-2013 à 10:37:29  profilanswer
 

n°115651
mechkurt
Posté le 28-10-2013 à 10:38:31  profilanswer
 

J'avais ça :

Code :
  1. [ssh-iptables]
  2. enabled  = true
  3. filter   = sshd
  4. action   = iptables[name=SSH, port=ssh, protocol=tcp]
  5.            sendmail-whois[name=SSH, dest=matthieu@e-perlink.com, sender=fail2ban@gulliver-modeles.fr]
  6. logpath  = /var/log/secure
  7. maxretry = 5


Il n'était peut être tout simplement pas démarré... :- /


---------------
D3
n°115652
Plam
Bear Metal
Posté le 28-10-2013 à 10:38:57  profilanswer
 

mechkurt a écrit :

J'avais ça :

Code :
  1. [ssh-iptables]
  2. enabled  = true
  3. filter   = sshd
  4. action   = iptables[name=SSH, port=ssh, protocol=tcp]
  5.            sendmail-whois[name=SSH, dest=matthieu@e-perlink.com, sender=fail2ban@gulliver-modeles.fr]
  6. logpath  = /var/log/secure
  7. maxretry = 5


Il n'était peut être tout simplement pas démarré... :- /


 
Possible :)


---------------
Spécialiste du bear metal
n°115653
mechkurt
Posté le 28-10-2013 à 10:45:00  profilanswer
 

Oui je suis sous centos 6.4, désolé de pas avoir précisé plus tôt...
 
Je suis allé voir sur mon autre dédiés (ou j'ai installé fail2ban en même temps sur les 2 et :

Code :
  1. [root@ns303753 ~]# service fail2ban status
  2. Fail2ban (pid 3412) is running...
  3. Status
  4. |- Number of jail:      1
  5. `- Jail list:           ssh-iptables


 
Je penses que je l'avais aussi lancé sur celui-ci, un oubli de ce genre me parait vraiment gros, mais peut-être qu'il y'a eu un redémarrage et que le service n'était pas lancé au boot ?


---------------
D3
n°115679
Plam
Bear Metal
Posté le 28-10-2013 à 18:14:59  profilanswer
 

Difficile à dire là comme ça.. En tout cas récupère juste les données importantes, inutile de conserver le reste auquel il est difficile de faire confiance maintenant !


---------------
Spécialiste du bear metal

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Infrastructures serveurs

  Plantage serveur dédiés OVH

 

Sujets relatifs
Configurer 2 passerelles sur un serveur DHCPInstallation Windows Serveur plus nas .
Adobe acrobat pro XI sur serveur TSEParamétrer un serveur VNC ??! +Transfert de fichier
Baie Réseau et Serveur RackableDéploiement Serveur Windows 2012
Aide pour mise en place d'un réseau local avec serveur webRecherche sources SQL Serveur 2000
Acceder au bios raid serveur IBM X3400 M3Information serveur connexion en TSE
Plus de sujets relatifs à : Plantage serveur dédiés OVH


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR