joanbono / Snorter

Snort + Barnyard2 + Pulledpork → The easy way!
https://joanbono.github.io/Snorter
GNU General Public License v3.0
165 stars 32 forks source link

docker snort - install packages #20

Closed mvording closed 6 years ago

mvording commented 7 years ago

Hello trying out this project as a docker container.

I attempted to run the shell script manually after building the container without running it in the Dockerfile, by launching the container running with /bin/bash first then calling the script in the docker container shell.

The following packages did not seem to be found when running under the kali linux image:

Reading state information... Done Package mysql-client is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Package mysql-server is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Package libmysqlclient-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'mysql-server' has no installation candidate E: Package 'libmysqlclient-dev' has no installation candidate E: Package 'mysql-client' has no installation candidate

    [i] INFO: Downloading BARNYARD2.

Cloning into 'barnyard2'... remote: Counting objects: 1292, done. remote: Total 1292 (delta 0), reused 0 (delta 0), pack-reused 1292 Receiving objects: 100% (1292/1292), 1.05 MiB | 391.00 KiB/s, done. Resolving deltas: 100% (896/896), done. ./Snorter.sh: line 194: autoreconf: command not found

    [i] INFO: Installing BARNYARD22.

./Snorter.sh: line 201: ./configure: No such file or directory make: No targets specified and no makefile found. Stop. make: No rule to make target 'install'. Stop.

    [+] INFO: BARNYARD2 installed successfully.

    [i] INFO: The SNORT database is going to be created. You will be asked for MySQL password 3 times
    [!] WARNING: Press ENTER to continue.

./Snorter.sh: line 226: mysql: command not found ./Snorter.sh: line 227: mysql: command not found ./Snorter.sh: line 228: mysql: command not found ./Snorter.sh: line 234: barnyard2: command not found

    [+] INFO: BARNYARD2 is successfully installed and configurated!
joanbono commented 7 years ago

Will check this and solve as soon as I return from holidays :)

Thanks!!

joanbono commented 6 years ago

Please, could you try this using the following docker image?

It seems that Kali has problems with MySQL

#Kali docker with SNORT + BARNYARD2 + PULLEDPORK
#Version 0.1.0
From debian:latest
MAINTAINER Joan Bono <@joan_bono>

ENV OINKCODE
ENV INTERFACE

RUN apt-get update && apt-get upgrade -y && apt-get install -y git curl wget
RUN git clone https://github.com/joanbono/Snorter.git /opt/Snorter
RUN sed -i "s/sudo //g" /opt/Snorter/src/Snorter.sh
RUN /opt/Snorter/src/Snorter.sh -o ${OINKCODE} -i ${INTERFACE}
USER root
WORKDIR /opt/Snorter
joanbono commented 6 years ago

Tested and working properly.

Also works as:

#Kali docker with SNORT + BARNYARD2 + PULLEDPORK
#Version 0.1.0
From ubuntu:latest
MAINTAINER Joan Bono <@joan_bono>

ENV OINKCODE
ENV INTERFACE

RUN apt-get update && apt-get upgrade -y && apt-get install -y git curl wget
RUN git clone https://github.com/joanbono/Snorter.git /opt/Snorter
RUN sed -i "s/sudo //g" /opt/Snorter/src/Snorter.sh
RUN /opt/Snorter/src/Snorter.sh -o ${OINKCODE} -i ${INTERFACE}
USER root
WORKDIR /opt/Snorter