Thuban
2018-12-01 7c496c045ad95c2426b9231565165c17dd538918
commit | author | age
77f371 1 [DEFAULT]
T 2 # 24h + 5min
3 # Time to keep banned a bad ip
54613d 4 watch_while = 86700
3a37e6 5 # Max tries before being banned
77f371 6 maxtries = 3
T 7 # pf table to keep bad IP.
8 # remember to clean the table with this command in a cron job :
3a37e6 9 #     /sbin/pfctl -t vilain_bruteforce -T expire 86400
77f371 10 vilain_table = vilain_bruteforce
54613d 11
T 12 # vilain log file
13 vilain_log = /var/log/daemon
3a37e6 14
90bc70 15 # duration before each checks on the different log files
T 16 sleeptime = 3.0
17
3a37e6 18 ### Ip ignored ###
T 19 [ignoreip]
6bbbca 20 ip1 = 127.0.0.1
40cb2e 21
77f371 22 ### Guardians
T 23 #[name of the guardian]
24 #logfile = /file/to/watch
25 #regex = regex that return the bad guy IP
40cb2e 26 #maxtries = 2 #facultative
77f371 27
T 28 [ssh]
29 logfile = /var/log/authlog
30 regex = .* Failed .* from ([\S]+) .*
31
32 [ssh2]
33 logfile = /var/log/authlog
34 regex = .* Connection closed by ([\S]+) .*
54613d 35
T 36 [ssh3]
37 logfile = /var/log/authlog
38 regex = .* Invalid user \w+ ([\S]+) .*
39
40 [ssh4]
41 logfile = /var/log/authlog
42 regex = .* Disconnected from authenticating user root ([\S]+) .*
77f371 43
3a37e6 44 #[http404]
T 45 #logfile = /var/www/logs/access.log
46 #regex = (?:\S+\s){1}(\S+).*\s404\s.*
47
48 [http401]
49 logfile = /var/www/logs/access.log
50 regex = (?:\S+\s){1}(\S+).*\s401\s.*
51
52 [http403]
53 logfile = /var/www/logs/access.log
54 regex = (?:\S+\s){1}(\S+).*\s403\s.*
55
56 [smtp]
57 logfile = /var/log/maillog
58 regex = .* event=failed-command address=([\S]+) .*
6bbbca 59 maxtries = 2
3a37e6 60
T 61 [dovecot]
62 logfile = /var/log/maillog
63 regex = .*auth failed.*rip=([\S]+),.*
6bbbca 64 maxtries = 2
3a37e6 65
T 66 [wordpress]
67 # don't use if you have wordpress
68 logfile = /var/www/logs/access.log
69 regex = (?:\S+\s){1}(\S+).*wp-login.php.*
6bbbca 70 maxtries = 1
3a37e6 71
54613d 72 # Nextcloud: login page
T 73 # Nextcloud 12 brings protection against brute-force attacks
74 # but 1/ not yet tested so far 2/ system protection is probably more efficient
75 [nextcloud]
76 logfile = /var/www/htdocs/datacloud/nextcloud.log
77 regex = .*Bruteforce attempt from \\"(.*)\\" detected
78
79 # Nextcloud: public shares protected by password
80 # regex is compliant with NginX log format:
81 #     /etc/nginx/nginx.conf:
82 #        log_format main '$remote_addr - $remote_user [$time_local] "$request" '
83 #                        '$status $body_bytes_sent "$http_referer" '
84 #                        '"$http_user_agent" "$http_x_forwarded_for"';
85 [nextcloud-share]
86 logfile = /var/www/logs/access-nextcloud.log
87 regex = (\d+\.\d+\.\d+\.\d+) \-.*POST /s/\w+/authenticate HTTP/1.1\" 200