Mehic.info

Centos – log files

All major system log files are located in the /var/log directory in Centos Linux. cron — Logs for all cronjobs that are run on the server dmesg — Logs from dmesg program which is used to examine or control the kernel ring buffer. lastlog — The binary log that contains all of the last login […]

Read more

Quick way to remove duplicates from MySQL database

DROP TABLE IF EXISTS tmp;create table tmp like mytable; ALTER TABLE tmp ADD UNIQUE INDEX(text1, text2, text3, text4, text5, text6); insert IGNORE into tmp select * from mytable; delete from mytable where id not in ( select id from tmp); DROP TABLE IF EXISTS tmp;

Read more

Snort 2.9.5.5. with Barnyard2 on Ubuntu 12.04

Well I had some problems on my server with config files for Snort and Barnyard so I will write short explanation here. First in /etc/snort/snort.conf define output like output unified2: filename snort.u2, limit 128 Then in /usr/local/etc/barnyard2.conf define output to database with : output database: log, mysql, user=snort_user password=snort dbname=snortdb host=127.0.0.1 output database: alert, mysql, user=snort_user password=snort […]

Read more