annotate syslog2iptables.conf.top @ 61:d80641be405b stable-1-0-15

add script to build syslog2iptables.conf
author Carl Byington <carl@five-ten-sg.com>
date Sat, 04 Oct 2014 10:01:32 -0700
parents
children 60f59936fabb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 context general {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 threshold 550;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 add_command "/sbin/iptables -I INPUT --src %s --jump DROP";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 remove_command "/sbin/iptables -D INPUT --src %s --jump DROP";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
7 ignore {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
8 127.0.0.0/8; // localhost
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 file "/var/log/secure" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 pattern "sshd.*Failed password .* from ::ffff:(.*) port" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15 message "ssh failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 pattern "sshd.*Failed password .* from (.*) port" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20 message "ssh failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 pattern "sshd.*authentication failure; .* rhost=(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 message "ssh failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27 pattern "sshd.*Did not receive identification string from (.*)" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
28 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
29 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
30 message "ssh failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
31 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
32 pattern "proftpd.*no such user found from (.*) \[" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
33 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
34 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
35 message "ftp failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 pattern "proftpd.* authentication failure; .* rhost=(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 message "ftp failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
41 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42 pattern "vsftpd.* authentication failure; .* rhost=(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
44 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45 message "ftp failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
46 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
47 pattern "dovecot.* authentication failure; .* rhost=::ffff:(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
48 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
49 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
50 message "dovecot failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
51 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52 pattern "dovecot.* authentication failure; .* rhost=(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
54 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 message "dovecot failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
56 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 file "/var/log/messages" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60 pattern "dovecot.* authentication failure; .* rhost=(.*) " {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
61 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63 message "dovecot failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65 pattern "kernel.*local-net-to.*SRC=(.*) DST=.*DPT=" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
67 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 message "kernel firewall blocked packet";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
70 pattern "kernel.*outside-net-from.*SRC=(.*) DST=.*DPT=" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72 bucket 400;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 message "kernel firewall blocked packet";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77 file "/var/log/maillog" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 pattern "\]: .* \[(.*)\] did not issue MAIL" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80 bucket 200;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81 message "sendmail banner probe";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 pattern "lost input channel from.* \[(.*)\] .* after (mail|rcpt|auth)" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 bucket 200;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 message "sendmail spammer dropping connection";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88 pattern " \[(.*)\]: possible SMTP attack" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 bucket 600;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 message "sendmail authentication attack";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93 pattern "rejecting commands from.* \[(.*)\] due to pre-greeting traffic" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 bucket 1800;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96 message "sendmail pre-greeting";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 pattern "authentication failure: checkpass failed,.*\[(.*)\]" {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
100 bucket 600;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
101 message "sendmail authentication attack";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
103 pattern "dovecot.*Aborted login.*rip=(.*)," {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
104 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
105 bucket 100;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
106 message "dovecot failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
107 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
108 pattern "dovecot: pop3-login: Disconnected: Shutting down.*rip=(.*)," {
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
109 index 1; // zero based
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110 bucket 100;
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
111 message "dovecot failed password";
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
112 };
d80641be405b add script to build syslog2iptables.conf
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
113 };