Skip to content

Instantly share code, notes, and snippets.

@terceranexus6
Created January 15, 2019 09:46
Show Gist options
  • Save terceranexus6/0a13e83495924d7ffc3dc28c96c87af2 to your computer and use it in GitHub Desktop.
Save terceranexus6/0a13e83495924d7ffc3dc28c96c87af2 to your computer and use it in GitHub Desktop.
Easy setup for suricata
#!/bin/bash
BLUE='\033[0;36m'
RED='\033[0;31m'
PURPLE='\033[0;35m'
NC='\033[0m' # No Color
echo -e "${BLUE}Let's install suricata. Please execute the configuration script before.${NC}"
echo -e "${BLUE}Installing dependencies...${NC}"
sudo apt-get install wget build-essential libpcre3-dev libpcre3-dbg automake autoconf libtool libpcap-dev libnet1-dev libyaml-dev zlib1g-dev libcap-ng-dev libjansson-dev
echo -e "${BLUE}Getting the tar file${NC}"
wget http://www.openinfosecfoundation.org/download/suricata-2.0.8.tar.gz
echo -e "${BLUE}Unpacking suricata${NC}"
tar -xvf suricata-2.0.8.tar.gz
echo -e "${BLUE}Configuring...${NC}"
cd suricata-2.0.8
./configure --sysconfdir=/etc --localstatedir=/var
read -p"Is everything going all right until here? yes/no >>" ANSWER
if [ "$ANSWER" == "no" ]
then
echo -e "${RED}Getting out...${NC}"
cd
exit 1
else
make
sudo make install
sudo make install-conf
sudo make install-rules
echo -e "${BLUE}Done. Enjoy${NC}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment