1 <!-- OSSEC example config -->
5 <email_notification>yes</email_notification>
6 <email_to>daniel.cid@example.com</email_to>
7 <smtp_server>localhost</smtp_server>
8 <email_from>ossecm@ossec.example.com.</email_from>
9 <!-- <email_reply_to>replyto@ossec.example.com.</email_reply_to> -->
13 <include>rules_config.xml</include>
14 <include>sshd_rules.xml</include>
15 <include>syslog_rules.xml</include>
16 <include>pix_rules.xml</include>
17 <include>named_rules.xml</include>
18 <include>pure-ftpd_rules.xml</include>
19 <include>proftpd_rules.xml</include>
20 <include>web_rules.xml</include>
21 <include>web_appsec_rules.xml</include>
22 <include>apache_rules.xml</include>
23 <include>ids_rules.xml</include>
24 <include>squid_rules.xml</include>
25 <include>firewall_rules.xml</include>
26 <include>postfix_rules.xml</include>
27 <include>sendmail_rules.xml</include>
28 <include>spamd_rules.xml</include>
29 <include>msauth_rules.xml</include>
30 <include>attack_rules.xml</include>
31 <include>dropbear_rules.xml</include>
32 <include>sysmon_rules.xml</include>
33 <include>opensmtpd_rules.xml</include>
34 <include>openbsd-dhcpd_rules.xml</include>
35 <include>nsd_rules.xml</include>
39 <!-- Frequency that syscheck is executed -- default every 2 hours -->
40 <frequency>7200</frequency>
42 <!-- Directories to check (perform all possible verifications) -->
43 <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
44 <directories check_all="yes">/bin,/sbin,/boot</directories>
46 <!-- Files/directories to ignore -->
47 <ignore>/etc/mtab</ignore>
48 <ignore>/etc/hosts.deny</ignore>
49 <ignore>/etc/mail/statistics</ignore>
50 <ignore>/etc/random-seed</ignore>
51 <ignore>/etc/random.seed</ignore>
52 <ignore>/etc/adjtime</ignore>
53 <ignore>/etc/httpd/logs</ignore>
55 <!-- Check the file, but never compute the diff -->
56 <nodiff>/etc/ssl/private.key</nodiff>
60 <rootkit_files>/var/ossec/etc/shared/rootkit_files.txt</rootkit_files>
61 <rootkit_trojans>/var/ossec/etc/shared/rootkit_trojans.txt</rootkit_trojans>
65 <white_list>127.0.0.1</white_list>
66 <white_list>::1</white_list>
67 <white_list>192.168.2.1</white_list>
68 <white_list>192.168.2.190</white_list>
69 <white_list>192.168.2.32</white_list>
70 <white_list>192.168.2.10</white_list>
74 <connection>secure</connection>
78 <log_alert_level>1</log_alert_level>
79 <email_alert_level>7</email_alert_level>
83 <name>host-deny</name>
84 <executable>host-deny.sh</executable>
85 <expect>srcip</expect>
86 <timeout_allowed>yes</timeout_allowed>
90 <name>firewall-drop</name>
91 <executable>firewall-drop.sh</executable>
92 <expect>srcip</expect>
93 <timeout_allowed>yes</timeout_allowed>
97 <name>disable-account</name>
98 <executable>disable-account.sh</executable>
100 <timeout_allowed>yes</timeout_allowed>
104 <!-- Active Response Config -->
106 <!-- This response is going to execute the host-deny
107 - command for every event that fires a rule with
108 - level (severity) >= 6.
109 - The IP is going to be blocked for 600 seconds.
111 <command>host-deny</command>
112 <location>local</location>
114 <timeout>600</timeout>
118 <!-- Firewall Drop response. Block the IP for
119 - 600 seconds on the firewall (iptables,
122 <command>firewall-drop</command>
123 <location>local</location>
125 <timeout>600</timeout>
128 <!-- Files to monitor (localfiles) -->
131 <log_format>syslog</log_format>
132 <location>/var/log/messages</location>
136 <log_format>syslog</log_format>
137 <location>/var/log/authlog</location>
141 <log_format>syslog</log_format>
142 <location>/var/log/secure</location>
146 <log_format>syslog</log_format>
147 <location>/var/log/xferlog</location>
151 <log_format>syslog</log_format>
152 <location>/var/log/maillog</location>
156 <log_format>apache</log_format>
157 <location>/var/www/logs/access_log</location>
161 <log_format>apache</log_format>
162 <location>/var/www/logs/error_log</location>