Insta Snorby 0.8.0 Install Notes (Revised): - Snorby/snorby GitHub Wiki
- Put LAN connection on eth0 (management network interface)
- Have SPAN connection ready (will go on eth1)
- Have your Oinkcode handy
- Enter your Oinkcode
- Install the security updates
- NTP – Edit /etc/ntp.conf (add your own ntp server)
- Apache Ports – Edit /etc/apache2/ports.conf to disable listening on port 80 (if desired) comment out (add “#”) at the start of both lines referencing port 80 and restart by entering: “/etc/init.d/apache2 restart” or simply wait until reboot later
- Set Snort monitoring port to eth1 (SPAN interface)
- Set interface to eth1 in /usr/lib/inithooks/everyboot.d/88snortstart
- Set interface to eth1 in /etc/snort/barnyard2.conf
- Identify and kill snort and barnyard processes using “ps aux | grep snort”
- Restart snort: “/usr/local/bin/snort -g snort -u snort -c /etc/snort/snort.conf -i eth1 -D
- Restart barnyard: /usr/local/bin/barnyard2 -c /etc/snort/barnyard2.conf -G /etc/snort/gen-msg.map -S /etc/sid-msg.map -d /var/log/snort -f snort.u2 -w /var/log/snort/barnyard2.waldo -D”
- Define “$HOME_NET” and “$EXTERNAL_NET” variables
- Consider and edit all other modifications with caution. https://www.snort.org/docs
- Consider configuring a BPF file to dump undesired traffic (See ”Creating BPF File” procedure below…)
- /usr/lib/inithooks/bin/pulledpork.py
- /usr/lib/inithooks/bin/oinkcode.py
- /usr/lib/inithooks/bin/interface_select.py
- /var/spool/cron/crontabs/root
- /root/crontmp
- /root/pulledpork-0.6.1/etc/pulledpork.conf (last line MUST reference “0.6.0” instead of “0.6.1”)
- Test pulledpork by running it manually: /root/pulledpork-0.6.1/pulledpork.pl -c /root/pulledpork-0.6.1/etc/pulledpork.conf -H -v >> /var/log/pulledpork 2>&1
- Check the date/time stamp on: /etc/snort/rules/snort.rules file or the log data at: /var/log/pulledpork
- /usr/lib/inithooks/bin/interface_select.py contains a reference to version 0.4-267, which should be 0.6-314.
- Change interface to eth1 in /etc/openfpc/openfpc-default.conf
- cd /var/www/snorby
- cp config/database.yml tmp
- cp config/snorby_config.yml tmp
- git stash save
- git pull
- git stash clear
- cp tmp/database.yml config
- cp tmp/snorby_config.yml config
- bundle install - -deployment
- rake snorby:setup
- Edit /var/www/snorby/config/database.yml as necessary
- Edit /var/www/snorby/config/snorby_config.yml as necessary
- Configure network interfaces to static IPs at /etc/network/interfaces
- Connect SPAN cable to eth1 interface
- Reboot the server
- Login to Snorby web interface as [email protected] and configure Admin settings
- vim /etc/snort/ignore.bpf (to create file and insert tcpdump lines like the following)
not (src host 10.x.x.x or src host 10.x.x.x)
- vim snort.conf (to add the following lines under “Step #2”)
Config bpf_file: /etc/snort/ignore.bpf
- Cd to the main snorby directory (in my case it is /var/www/snorby) and execute these commands:
- rails c
- Snorby::Jobs.clear_cache(true)
- Snorby::Jobs.run_now!
- Cd to the main snorby directory (in my case it is /var/www/snorby) and execute these commands:
- rails c
- Snorby::Jobs.reset_cache(:all, true)
- Cd to the main snorby directory (in my case it is /var/www/snorby) and execute the following commands:
- rake snorby:hard_reset
- rails c
- Snorby::Worker.restart