tar.gzsudo tar xvfvz snortrules-snapshot-2980.tar.gz -C /etc/snortMove all new files from/etc/snort/etcto/etc/snort(and get rid of/etc/snort/etcfolder that wascopied as well):sudo cp ./*.conf* ../sudo cp ./*.map ../cd /etc/snortsudo rm -Rf /etc/snort/etcNow modify/etc/snort/snort.confwith any changes from the originalsnort.conf.We want the newsnort.confin case it references any new rulesets.Test the configuration file with Snort:sudo snort -T -c /etc/snort/snort.confYou can now run snort as you normally would (with a startup script or manually).25
CApendix: Troubleshooting Barnyard2If barnyard2 is having issues loading events, sometimes deleting all of snort’s unified2 event logs and recreatethe waldo file can help (you’ll loose the events that are saved there)To do this:sudo rm /var/log/snort/*sudo touch /var/log/snort/barnyard2.waldosudo chown snort.snort /var/log/snort/barnyard2.waldoOther troubleshooting steps:•Reboot the server.•Be patient. When barnyard2 has a large number of events to process, it can take some time beforethey show in the database (say you accidentally ransudo ping -i 0.001 10.0.0.104for a minute,generating upwards of 30,000 alerts on your snort server. This can take some time to process.•to check for events in the snort database:mysql -u snort -p -D snort -e "select count(*) from event"•Are logs being written to /var/log/snort, in the form snort.u2.nnnnnnnnnn?•Check the system logcat /var/log/syslog | grep barnyard•Check if the services are running# upstart or systemD:service snort statusservice barnyard2 status26