Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 12/07/2008, à 14:53

Geminga75

Installation de snort... problème

Bonjour à tous,

Je viens à vous avec un petit soucis : lorsque j'essaie d'installer (en mode console) snort-mysql, je recontre un problème dont je liste la sortie ici...

root@avalon:~# apt-get install snort-mysql
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Paquets suggérés :
  snort-doc
Les NOUVEAUX paquets suivants seront installés :
  snort-mysql
0 mis à jour, 1 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 0o/469ko dans les archives.
Après cette opération, 1090ko d'espace disque supplémentaires seront utilisés.
Préconfiguration des paquets...
Sélection du paquet snort-mysql précédemment désélectionné.
(Lecture de la base de données... 
dpkg : avertissement important : le fichier contenant la liste des fichiers du paquet « snort-common-libraries » étant manquant, il est considéré qu'aucun fichier du paquet n'est actuellement installé.

dpkg : avertissement important : le fichier contenant la liste des fichiers du paquet « snort-common » étant manquant, il est considéré qu'aucun fichier du paquet n'est actuellement installé.

dpkg : avertissement important : le fichier contenant la liste des fichiers du paquet « snort-rules-default » étant manquant, il est considéré qu'aucun fichier du paquet n'est actuellement installé.
192995 fichiers et répertoires déjà installés.)
Dépaquetage de snort-mysql (à partir de .../snort-mysql_2.7.0-14_i386.deb) ...
Paramétrage de snort-mysql (2.7.0-14) ...
 * Stopping Network Intrusion Detection System  snort                                                                                                 * No running snort instance found
 * Starting Network Intrusion Detection System  snort                                                                                                 * /etc/snort/db-pending-config file found
 * Snort will not start as its database is not yet configured.
 * Please configure the database as described in
 * /usr/share/doc/snort-{pgsql,mysql}/README-database.Debian
 * and remove /etc/snort/db-pending-config
invoke-rc.d: initscript snort, action "start" failed.
dpkg : erreur de traitement de snort-mysql (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 6
Des erreurs ont été rencontrées pendant l'exécution :
 snort-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@avalon:~#

Je passe par la console car l'erreur rencontrée sous Synaptic n'était pas assez parlante. Lors de l'installation, on me demande bien quel réseau Snort doit surveiller, l'affichage du message d'information concernant la base MySQL se fait bien et le message précédent apparaît sur la console... et là je suis bloqué, je ne vois pas où se trouve la solution.

Help me please... sad

#2 Le 12/07/2008, à 21:54

jojo-lapin

Re : Installation de snort... problème

Bonjour,

premièrement tu as un soucis au niveau des fichiers list pour les paquets snort-common-libraries, snort-common et snort-rules-default. Tu as du faire une installation de ces paquets déjà le mieux c'est de les désinstaller ainsi que snort-mysql pour refaire quelque chose de propre.

sudo apt-get remove snort-common-libraries snort-common snort-rules-default

si cette commande ne marche pas tente celle-ci:

sudo dpkg -r --force-all snort-common-libraries snort-common snort-rules-default

Dans ton message d'erreur, on peut voir aussi que snort ne peut être lancé car la base de donnée n'a pu être configurée. Assure toi d'avoir bien démarrer le serveur mysql dans le doute.

Ensuite réinstalle tout.

apt-get install snort-mysql

Les dépendances seront automatiquement installées.

#3 Le 12/07/2008, à 23:07

Geminga75

Re : Installation de snort... problème

Merci Jojo-lapin pour ta réponse. Effectivement, ça va un petit peu plus loin maintenant... mais l'installation bloque et lorsque je tente un "dpkg --configure -a", voici le résultat :

root@avalon:~# dpkg --configure -a
Paramétrage de snort-mysql (2.7.0-14) ...
 * Stopping Network Intrusion Detection System  snort                           
 * No running snort instance found
 * Starting Network Intrusion Detection System  snort                           
 dpkg : erreur de traitement de snort-mysql (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 255
Des erreurs ont été rencontrées pendant l'exécution :
 snort-mysql
root@avalon:~#

Trouvant la console en root lente, je lance un "ps -ef" pour voir les process en rapport avec snort (suite à cette installation), voici le résultat :

root@avalon:~# ps -ef | grep snort
root     24528     1  0 15:58 ?        00:00:00 /usr/sbin/snort -m 027 -D -d -l /var/log/snort -u snort -g snort -c /etc/snort/snort.conf -S HOME_NET=[192.168.1.100/32] -i eth0
root     30117     1  0 22:56 pts/1    00:00:00 /bin/sh /usr/sbin/invoke-rc.d snort start
root     30133 30117  0 22:56 pts/1    00:00:00 /bin/sh -e /etc/init.d/snort start
root     30146 30133  0 22:56 pts/1    00:00:00 /usr/sbin/snort -m 027 -D -d -l /var/log/snort -u snort -g snort -c /etc/snort/snort.conf -S HOME_NET=[192.168.1.100/32] -i eth0
root     30294 30204  0 23:03 pts/2    00:00:00 grep snort
root@avalon:~#

Visiblement, l'installation bloque en arrière plan et je ne vois pas pourquoi... Mon serveur MySQL est protégé par un mot de passe (et non laissé à vide par défaut), le soucis pourrait-il venir de là ? neutral

J'obtiens la même chose avec "apt-get remove snort-mysql" + "apt-get install snort-mysql"...

#4 Le 12/07/2008, à 23:57

jojo-lapin

Re : Installation de snort... problème

Je pense que la configuration des bases de données mysql pour snort échoue effectivement.
Ce qui est étonnant c'est que tu as deux processus snort qui tournent.

Personnellement je trouve que c'est dommage d'essayer de tout automatiser et que c'est plus propre de le faire à la main.

Comme il est dit dans le message d'erreurs de ton premier post, tu as la possibilité de configurer toi-même tes bases mysql:

voici la partie de ton message d'erreur intéressante:

Snort will not start as its database is not yet configured.
 * Please configure the database as described in
 * /usr/share/doc/snort-{pgsql,mysql}/README-database.Debian
 * and remove /etc/snort/db-pending-config

Tu "kill" les processus snort qui restent puis va voir ce qu'il y a d'écrit dans /usr/share/doc/snort-{pgsql,mysql}/README-database.Debian (fichier d'explication pour la configuration des bases de données à savoir création d'une base de données pour snort, d'un utilisateur mysql pour snort avec un mot de passe) et ensuite enlève /etc/snort/db-pending-config.

#5 Le 12/08/2012, à 18:15

Arnold59

Re : Installation de snort... problème

Bonjour,

Je souhaite installé la nouvelle version de snort 2.9.3.1 sous Linux Ubuntu 12.04

J'ai récupéré le source snort-2.9.3.1.tar.gz depuis le site de www.snort.org

http://www.snort.org/snort-downloads

1) Installation de snort 2.9.3.1 depuis le source

snort-2.9.3.1.tar.gz
tar -xvf snort-2.9.3.1.tar.gz

 /usr/local/snort-2.9.3.1
aclocal.m4    config.log    contrib  etc         m4           mkinstalldirs  snort.8      tools
ChangeLog     config.sub    COPYING  install-sh  Makefile.am  preproc_rules  snort.pc.in  verstuff.pl
config.guess  configure     depcomp  LICENSE     Makefile.in  RELEASE.NOTES  src          ylwrap
config.h.in   configure.in  doc      ltmain.sh   missing      rpm            templates

./configure 

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for bison... bison
checking for flex... flex
checking for inttypes.h... (cached) yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking for floor in -lm... yes
checking for ceil in -lm... yes
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_parse in -luuid... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking whether printf must be declared... no
checking whether fprintf must be declared... no
checking whether syslog must be declared... no
checking whether puts must be declared... no
checking whether fputs must be declared... no
checking whether fputc must be declared... no
checking whether fopen must be declared... no
checking whether fclose must be declared... no
checking whether fwrite must be declared... no
checking whether fflush must be declared... no
checking whether getopt must be declared... no
checking whether bzero must be declared... no
checking whether bcopy must be declared... no
checking whether memset must be declared... no
checking whether strtol must be declared... no
checking whether strcasecmp must be declared... no
checking whether strncasecmp must be declared... no
checking whether strerror must be declared... no
checking whether perror must be declared... no
checking whether socket must be declared... no
checking whether sendto must be declared... no
checking whether vsnprintf must be declared... no
checking whether snprintf must be declared... no
checking whether strtoul must be declared... no
checking for sigaction... yes
checking for strlcpy... no
checking for strlcat... no
checking for strerror... yes
checking for vswprintf... yes
checking for wprintf... yes
checking for memrchr... yes
checking for inet_ntop... yes
checking for snprintf... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long int... 4
checking size of long long int... 8
checking size of unsigned int... 4
checking size of unsigned long int... 4
checking size of unsigned long long int... 8
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for boolean... no
checking for INADDR_NONE... yes
checking for __FUNCTION__... yes
checking for pcap_datalink in -lpcap... no
checking pfring.h usability... no
checking pfring.h presence... no
checking for pfring.h... no
checking for pfring_open in -lpfring... no
checking for pfring_open in -lpcap... no

   ERROR!  Libpcap library/headers (libpcap.a (or .so)/pcap.h)
   not found, go get it from http://www.tcpdump.org
   or use the --with-libpcap-* options, if you have it installed
   in unusual place.  Also check if your libpcap depends on another
   shared library that may be installed in an unusual place


2) Installation de libpcap avec synaptic :

Sélection du paquet libpcap0.8-dev précédemment désélectionné.
(Lecture de la base de données... 408081 fichiers et répertoires déjà installés.)
Dépaquetage de libpcap0.8-dev (à partir de .../libpcap0.8-dev_1.1.1-10_i386.deb) ...
Sélection du paquet libpcap-dev précédemment désélectionné.
Dépaquetage de libpcap-dev (à partir de .../libpcap-dev_1.1.1-10_all.deb) ...
Traitement des actions différées (« triggers ») pour « man-db »...
Paramétrage de libpcap0.8-dev (1.1.1-10) ...
Paramétrage de libpcap-dev (1.1.1-10) ...
./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for bison... bison
checking for flex... flex
checking for inttypes.h... (cached) yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking for floor in -lm... yes
checking for ceil in -lm... yes
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_parse in -luuid... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking whether printf must be declared... no
checking whether fprintf must be declared... no
checking whether syslog must be declared... no
checking whether puts must be declared... no
checking whether fputs must be declared... no
checking whether fputc must be declared... no
checking whether fopen must be declared... no
checking whether fclose must be declared... no
checking whether fwrite must be declared... no
checking whether fflush must be declared... no
checking whether getopt must be declared... no
checking whether bzero must be declared... no
checking whether bcopy must be declared... no
checking whether memset must be declared... no
checking whether strtol must be declared... no
checking whether strcasecmp must be declared... no
checking whether strncasecmp must be declared... no
checking whether strerror must be declared... no
checking whether perror must be declared... no
checking whether socket must be declared... no
checking whether sendto must be declared... no
checking whether vsnprintf must be declared... no
checking whether snprintf must be declared... no
checking whether strtoul must be declared... no
checking for sigaction... yes
checking for strlcpy... no
checking for strlcat... no
checking for strerror... yes
checking for vswprintf... yes
checking for wprintf... yes
checking for memrchr... yes
checking for inet_ntop... yes
checking for snprintf... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long int... 4
checking size of long long int... 8
checking size of unsigned int... 4
checking size of unsigned long int... 4
checking size of unsigned long long int... 8
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for boolean... no
checking for INADDR_NONE... yes
checking for __FUNCTION__... yes
checking for pcap_datalink in -lpcap... yes
checking for pcap_lex_destroy... no
checking for pcap_lib_version... yes
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking for pcre_compile in -lpcre... yes
checking for libpcre version 6.0 or greater... yes
checking dnet.h usability... no
checking dnet.h presence... no
checking for dnet.h... no
checking dumbnet.h usability... no
checking dumbnet.h presence... no
checking for dumbnet.h... no

   ERROR!  dnet header not found, go get it from
   http://code.google.com/p/libdnet/ or use the --with-dnet-*
   options, if you have it installed in an unusual place

?? dnet :  http://code.google.com/p/libdnet/ or use the --with-dnet-*

Coté synaptic :  dnet & libdnet correspondent 

dnet :

DECnet user programs and daemons
These tools are the application layer interface for DECnet on Linux systems.
They provide file/terminal access facilities between OpenVMS and Linux and
remote execution of commands.
Also included is a Linux version of the VMS "Phone" utility and a VMSMail
to SMTP gateway.

libdnet

This is the base package for Linux DECnet. It contains the necessary
configuration files and a script to set up the MAC address of your
Ethernet card(s) at boot-up

comment compiler correctement snort-2.9.3.1 ?

D'avance merci.

Existera-t-il le paquetage deb snort-2.9.3.1 pour Ubuntu ?

Dernière modification par Arnold59 (Le 12/08/2012, à 18:27)

Hors ligne

#6 Le 29/11/2012, à 13:39

Zoulou.4556

Re : Installation de snort... problème

slt, pour le deb faut aller voir sur launchpad mais je n ai pas regardé si il y avait la version que tu demande.

Dernière modification par Zoulou.4556 (Le 29/11/2012, à 13:43)


Il est un des symboles de la résistance face à l'envahisseur et l’oppresseur des libertés, le zoulou est aussi une langue aillant le plus de locuteurs en Afrique australe dont la communauté Ubuntu.

Hors ligne