Mercurial > repos > other > Puppet
annotate modules/fail2ban/manifests/init.pp @ 341:3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
We can now have multiple lists (currently hardcoded at two)
so that expiring the instaban doesn't remove the longer
repeat offence ban
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 27 May 2020 19:00:28 +0100 |
parents | a79ad974a548 |
children | cd0e77678dca |
rev | line source |
---|---|
292 | 1 class fail2ban ( |
2 $firewall_cmd, | |
3 ) { | |
4 package { 'fail2ban': | |
5 ensure => installed, | |
6 } | |
7 service { 'fail2ban': | |
8 ensure => running, | |
9 enable => true | |
10 } | |
11 File<| tag == 'fail2ban' |> { | |
12 ensure => present, | |
13 require => Package['fail2ban'], | |
14 notify => Service['fail2ban'], | |
15 } | |
16 file { '/etc/fail2ban/fail2ban.local': | |
17 source => 'puppet:///modules/fail2ban/fail2ban.local', | |
18 } | |
19 file { '/etc/fail2ban/jail.local': | |
20 source => 'puppet:///modules/fail2ban/jail.local', | |
21 } | |
22 file { '/etc/fail2ban/action.d/apf.conf': | |
23 source => 'puppet:///modules/fail2ban/apf.conf', | |
24 } | |
25 | |
26 if $firewall_cmd == 'iptables' { | |
27 $firewall_ban_cmd = 'iptables-multiport' | |
28 } else { | |
29 $firewall_ban_cmd = $firewall_cmd | |
30 } | |
337
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
31 # Create an empty banlist file if it doesn't exist |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
32 exec { 'httxt2dbm -i /dev/null -o /etc/httpd/conf.custom/apache_banlist.db': |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
33 path => '/usr/bin', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
34 unless => 'test -f /etc/httpd/conf.custom/apache_banlist.db', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
35 before => Service['httpd'], |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
36 } |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
37 file { '/tmp/apache_banlist.txt': |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
38 ensure => present, |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
39 seltype => 'httpd_config_t', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
40 } |
341
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
41 # Create an empty repeat banlist file if it doesn't exist |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
42 exec { 'httxt2dbm -i /dev/null -o /etc/httpd/conf.custom/apache_repeat_banlist.db': |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
43 path => '/usr/bin', |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
44 unless => 'test -f /etc/httpd/conf.custom/apache_repeat_banlist.db', |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
45 before => Service['httpd'], |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
46 } |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
47 file { '/tmp/apache_repeat_banlist.txt': |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
48 ensure => present, |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
49 seltype => 'httpd_config_t', |
3a1b19f6a054
Add a "repeat offender" ban to Apache IP block
IBBoard <dev@ibboard.co.uk>
parents:
337
diff
changeset
|
50 } |
337
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
51 # And let the httxt2dbm process work the rest of the time |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
52 file { '/etc/selinux/apache-ip-banlist.pp': |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
53 source => 'puppet:///modules/fail2ban/apache-ip-banlist.pp', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
54 } ~> |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
55 exec { 'semodule -i /etc/selinux/apache-ip-banlist.pp': |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
56 path => '/usr/sbin', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
57 refreshonly => true, |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
58 } |
292 | 59 file { '/etc/fail2ban/action.d/firewall-ban.conf': |
60 ensure => link, | |
61 target => "/etc/fail2ban/action.d/${firewall_ban_cmd}.conf", | |
62 } | |
337
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
63 file { '/etc/fail2ban/action.d/ibb-apache-ip-block.conf': |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
64 source => 'puppet:///modules/fail2ban/ibb-apache-ip-block.conf', |
a79ad974a548
Implement fail2ban for Apache as mod_rewrite
IBBoard <dev@ibboard.co.uk>
parents:
324
diff
changeset
|
65 } |
292 | 66 file { '/etc/fail2ban/filter.d/ibb-apache-exploits-instaban.conf': |
67 source => 'puppet:///modules/fail2ban/ibb-apache-exploits-instaban.conf', | |
68 } | |
69 file { '/etc/fail2ban/filter.d/ibb-apache-shellshock.conf': | |
70 source => 'puppet:///modules/fail2ban/ibb-apache-shellshock.conf', | |
71 } | |
72 file { '/etc/fail2ban/filter.d/ibb-repeat-offender.conf': | |
73 source => 'puppet:///modules/fail2ban/ibb-repeat-offender.conf', | |
74 } | |
75 file { '/etc/fail2ban/filter.d/ibb-repeat-offender-ssh.conf': | |
76 source => 'puppet:///modules/fail2ban/ibb-repeat-offender-ssh.conf', | |
77 } | |
78 file { '/etc/fail2ban/filter.d/ibb-postfix-spammers.conf': | |
79 source => 'puppet:///modules/fail2ban/ibb-postfix-spammers.conf', | |
80 } | |
81 file { '/etc/fail2ban/filter.d/ibb-postfix-malicious.conf': | |
82 source => 'puppet:///modules/fail2ban/ibb-postfix-malicious.conf', | |
83 } | |
84 file { '/etc/fail2ban/filter.d/ibb-postfix.conf': | |
85 source => 'puppet:///modules/fail2ban/ibb-postfix.conf', | |
86 } | |
87 file { '/etc/fail2ban/filter.d/ibb-sshd.conf': | |
88 source => 'puppet:///modules/fail2ban/ibb-sshd.conf', | |
89 } | |
90 | |
91 $bad_users = [ | |
297 | 92 '[^0-9a-zA-Z]+', |
292 | 93 '[0-9]+', |
297 | 94 '[0-9a-zA-Z]{1,3}', |
292 | 95 '([0-9a-z])\2{2,}', |
96 'abused', | |
97 'adm', | |
98 'Admin', | |
297 | 99 'admins?[0-9]+', |
100 'administr[a-z]+', # administracion, administrador, administradorweb, administrator, etc | |
294 | 101 'admissions', |
292 | 102 'altibase', |
103 'alumni', | |
104 'amavisd?', | |
295 | 105 'amministratore', |
292 | 106 'anwenderschnittstelle', |
107 'anonymous', | |
108 'ansible', | |
109 'aptproxy', | |
297 | 110 'apt-mirror', |
111 'ark(server)?', | |
292 | 112 'asterisk', |
297 | 113 'audio', |
292 | 114 'auser', |
297 | 115 'autologin', |
292 | 116 'avahi', |
117 'avis', | |
118 'backlog', | |
119 'backup(s|er|pc|user)?', | |
297 | 120 'bash', |
308
edd1e3b444e7
Blacklist more users on SSH including bugzilla
IBBoard <dev@ibboard.co.uk>
parents:
305
diff
changeset
|
121 'batch', |
297 | 122 'beagleindex', |
292 | 123 'bf2', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
124 '.*bitbucket', |
324
b0928653dfc2
Blacklist more users, including sshd, ftpadmin and a cPanel tool
IBBoard <dev@ibboard.co.uk>
parents:
308
diff
changeset
|
125 'bind', |
293
55762b436f89
Add more blacklisted SSH usernames
IBBoard <dev@ibboard.co.uk>
parents:
292
diff
changeset
|
126 'bitcoin', |
292 | 127 'bitnami', |
128 'bitrix', | |
308
edd1e3b444e7
Blacklist more users on SSH including bugzilla
IBBoard <dev@ibboard.co.uk>
parents:
305
diff
changeset
|
129 'bkroot', |
297 | 130 'blog', |
292 | 131 'boinc', |
132 'botmaster', | |
308
edd1e3b444e7
Blacklist more users on SSH including bugzilla
IBBoard <dev@ibboard.co.uk>
parents:
305
diff
changeset
|
133 'bugzilla', |
292 | 134 'build', |
135 'buscador', | |
136 'cacti(user)?', | |
297 | 137 'carrerasoft', |
292 | 138 'catchall', |
297 | 139 'celery', |
292 | 140 'cemergen', |
297 | 141 'centos', |
292 | 142 'chef', |
297 | 143 'cgi', |
144 'chromeuser', | |
292 | 145 'cinema', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
146 'cinstall', |
297 | 147 'cisco', |
292 | 148 'clamav', |
149 'cliente?[0-9]*', | |
150 'clouduser', | |
151 'com', | |
152 'comercial', | |
153 'control', | |
154 'couchdb', | |
155 'cpanel', | |
324
b0928653dfc2
Blacklist more users, including sshd, ftpadmin and a cPanel tool
IBBoard <dev@ibboard.co.uk>
parents:
308
diff
changeset
|
156 'cpanelrrdtool', |
292 | 157 'create', |
158 'cron', | |
297 | 159 '(cs(s|go|cz)|arma|mc|tf2?|sdtd|web|pz)-?se?rve?r?', |
160 'cs-?go1?', | |
161 'CumulusLinux!', | |
292 | 162 'cyrus[0-9]*', |
163 'daemon', | |
164 'danger', | |
297 | 165 'darwin', |
166 'dasuse?r', | |
167 'data', | |
292 | 168 'debian(-spamd)?', |
169 'default', | |
170 'dell', | |
297 | 171 'deploy(er)?[0-9]*', |
292 | 172 'desktop', |
173 'developer', | |
297 | 174 'devdata', |
292 | 175 'devops', |
176 'devteam', | |
177 'dietpi', | |
297 | 178 'discordbot', |
179 'disklessadmin', | |
292 | 180 'django', |
297 | 181 'dmarc', |
182 'dockeruser', | |
292 | 183 'dotblot', |
184 'download', | |
185 'dovecot', | |
297 | 186 'dovenull', |
294 | 187 'duplicity', |
292 | 188 'easy', |
189 'ec2-user', | |
297 | 190 'ecquser', |
292 | 191 'edu(cation)?[0-9]*', |
192 'e-shop', | |
297 | 193 'elastic', |
293
55762b436f89
Add more blacklisted SSH usernames
IBBoard <dev@ibboard.co.uk>
parents:
292
diff
changeset
|
194 'elsearch', |
292 | 195 'engin(eer)?', |
196 'esadmin', | |
197 'events', | |
198 'exports?', | |
199 'facebook', | |
200 'factorio', | |
201 'fax', | |
297 | 202 'fcweb', |
203 'fetchmail', | |
292 | 204 'filter', |
205 'firebird', | |
297 | 206 'firefox', |
324
b0928653dfc2
Blacklist more users, including sshd, ftpadmin and a cPanel tool
IBBoard <dev@ibboard.co.uk>
parents:
308
diff
changeset
|
207 'ftp(admin)?', |
292 | 208 'fuser', |
209 'games', | |
210 'gdm', | |
211 'geniuz', | |
297 | 212 'getmail', |
292 | 213 'ggc_user', |
214 'ghost', | |
297 | 215 'git(olite?|blit|lab(_ci)?|admi?n?|use?r)?', |
292 | 216 'gmail', |
294 | 217 'gmodserver', |
218 'gnuhealth', | |
292 | 219 'gopher', |
297 | 220 'government', |
292 | 221 'guest', |
222 'hacker', | |
223 'hadoop', | |
297 | 224 'haldaemon', |
292 | 225 'harvard', |
297 | 226 'hduser', |
227 'headmaster', | |
292 | 228 'helpdesk', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
229 'hive', |
292 | 230 'home', |
231 'host', | |
232 'httpd?', | |
294 | 233 'httpfs', |
292 | 234 'huawei', |
297 | 235 'iamroot', |
292 | 236 'iceuser', |
237 'imscp', | |
297 | 238 'info(rmix)?[0-9]*', |
239 'installer', | |
240 'inventario', | |
292 | 241 'java', |
242 'jboss', | |
243 'jenkins', | |
244 'jira', | |
297 | 245 'jmeter', |
292 | 246 'jsboss', |
297 | 247 'juniper', |
292 | 248 'kafka', |
249 'kodi', | |
295 | 250 'kms', |
297 | 251 'legacy', |
292 | 252 'library', |
253 'libsys', | |
254 'libuuid', | |
255 'linode', | |
256 'linux', | |
295 | 257 'localadmin', |
297 | 258 'logcheck', |
292 | 259 'login', |
260 'logout', | |
295 | 261 'logstash', |
297 | 262 'logview(er)?', |
263 'lsfadmin', | |
292 | 264 'lynx', |
297 | 265 'magento', |
292 | 266 'mailer', |
267 'mailman', | |
297 | 268 'mailtest', |
292 | 269 'maintain', |
270 'majordomo', | |
271 'man', | |
272 'mantis', | |
296
2f4d0ea4cb55
Blacklist Portuguese support, MapR, numbered Oracle and more
IBBoard <dev@ibboard.co.uk>
parents:
295
diff
changeset
|
273 'mapruser', |
292 | 274 'marketing', |
275 'master', | |
276 'membership', | |
297 | 277 'messagebus', |
292 | 278 'minecraft', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
279 'mirc', |
292 | 280 'modem', |
281 'mongo(db|user)?', | |
297 | 282 'monitor(ing)?', |
292 | 283 'more', |
284 'moher', | |
285 'mpiuser', | |
297 | 286 'mqadm', |
292 | 287 'musi[ck]bot', |
297 | 288 '(my?|pg)sq(ue)?l[0-9]*', |
292 | 289 'mythtv', |
290 'nagios', | |
297 | 291 'named', |
292 | 292 'nasa', |
296
2f4d0ea4cb55
Blacklist Portuguese support, MapR, numbered Oracle and more
IBBoard <dev@ibboard.co.uk>
parents:
295
diff
changeset
|
293 'ncs', |
297 | 294 'nessus', |
295 'netadmin', | |
296 'netdiag', | |
292 | 297 'netdump', |
297 | 298 'network', |
292 | 299 'netzplatz', |
300 'newadmin', | |
295 | 301 'newuser', |
292 | 302 'nexus', |
297 | 303 'nfinity', |
292 | 304 'nfs', |
305 '(nfs)?nobody', | |
306 'nginx', | |
307 'noc', | |
297 | 308 'node', |
292 | 309 'nothing', |
310 'NpC', | |
311 'nux', | |
312 'odoo', | |
313 'odroid', | |
297 | 314 'office', |
315 'omsagent', | |
292 | 316 'onyxeye', |
297 | 317 'oozie', |
292 | 318 'openbravo', |
294 | 319 'openfire', |
292 | 320 'openvpn', |
321 'operador', | |
322 'operator', | |
323 'ops(code)?', | |
324 'oprofile', | |
297 | 325 'ora(cle|prod|vis)[0-9]*', |
292 | 326 'osmc', |
295 | 327 'owncloud', |
292 | 328 'papernet', |
297 | 329 'passwo?r?d', |
292 | 330 'payments', |
331 'pay_?pal', | |
294 | 332 'pdfbox', |
292 | 333 'pentaho', |
297 | 334 'php[0-9]*', |
335 'platform', | |
292 | 336 'PlcmSpIp(PlcmSpIp)?', |
297 | 337 'plex', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
338 'polkitd?', |
297 | 339 'popd?3?', |
292 | 340 'popuser', |
341 'postfix', | |
297 | 342 'p0stgr3s', |
292 | 343 'postgres', |
344 'postmaster', | |
297 | 345 'pptpd', |
292 | 346 'print', |
347 'privoxy', | |
348 'proba', | |
349 'proxy', | |
295 | 350 'public', |
292 | 351 'puppet', |
352 'qhsupport', | |
353 'rabbit(mq)?', | |
354 'radiusd?', | |
297 | 355 'readonly', |
356 'reboot', | |
357 'recording', | |
292 | 358 'redis', |
359 'redmine', | |
297 | 360 'remote', |
361 'reports', | |
292 | 362 'riakcs', |
363 'root[0-9]+', | |
364 'rpc(user)?', | |
297 | 365 'rpm', |
292 | 366 'RPM', |
367 'rtorrent', | |
368 'rustserver', | |
369 'sales[0-9]+', | |
370 's?bin', | |
297 | 371 '(samba|sshd|git|student|tomcat|abc|web|info|(vpn|appl?|my|db)?(dev|use?r|server|man|manager|mgr)|account)[0-9]*', |
292 | 372 'saslauth', |
297 | 373 'scan(n?er)?', |
292 | 374 'screen', |
375 'search', | |
297 | 376 'sekretariat', |
294 | 377 'serverpilot', |
292 | 378 'service', |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
379 'setup', |
297 | 380 '(s|u|ams|admin|inss|pro|web)?ftp(d|[_-]?use?r|home|_?test|immo)?[0-9]*', |
292 | 381 'sftponly', |
382 'shell', | |
383 'shop', | |
297 | 384 'sinusbot[0-9]*', |
324
b0928653dfc2
Blacklist more users, including sshd, ftpadmin and a cPanel tool
IBBoard <dev@ibboard.co.uk>
parents:
308
diff
changeset
|
385 'sirius', |
297 | 386 'smbguest', |
387 'smbuse?r', | |
292 | 388 'smmsp', |
389 'socket', | |
390 'software', | |
391 'solarus', | |
308
edd1e3b444e7
Blacklist more users on SSH including bugzilla
IBBoard <dev@ibboard.co.uk>
parents:
305
diff
changeset
|
392 'speech-dispatcher', |
292 | 393 'splunk', |
297 | 394 'sprummlbot', |
292 | 395 'squid', |
297 | 396 'squirrelmail[0-9]+', |
397 'srvadmin', | |
324
b0928653dfc2
Blacklist more users, including sshd, ftpadmin and a cPanel tool
IBBoard <dev@ibboard.co.uk>
parents:
308
diff
changeset
|
398 'sshd', |
292 | 399 'sshusr', |
400 'staffc', | |
401 'steam(cmd)?', | |
402 'store', | |
297 | 403 'stunnel', |
292 | 404 'superuser', |
296
2f4d0ea4cb55
Blacklist Portuguese support, MapR, numbered Oracle and more
IBBoard <dev@ibboard.co.uk>
parents:
295
diff
changeset
|
405 'suporte', |
292 | 406 'support', |
297 | 407 'svn(root)?', |
293
55762b436f89
Add more blacklisted SSH usernames
IBBoard <dev@ibboard.co.uk>
parents:
292
diff
changeset
|
408 'sybase', |
297 | 409 'sync[0-9]*', |
292 | 410 'sysadmin', |
411 'system', | |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
412 'teamspeak[234]?(-?use?r)?', |
292 | 413 'telkom', |
297 | 414 'telnetd?', |
415 'te?mp(use?r)?[0-9]*', | |
305
38e35360a390
Blacklist hive, polkitd, cinstall and more as SSH logins
IBBoard <dev@ibboard.co.uk>
parents:
297
diff
changeset
|
416 'test((er?|ing|ftp|man|linux|use?r|u)[0-9]*|[0-9]+)?', |
292 | 417 '(test)?username', |
418 'text', | |
419 'tomcat', | |
420 'tools', | |
421 'toor', | |
297 | 422 'ts[23](se?rv(er)?|(musi[ck])?bot|sleep)?', |
423 'tss', | |
292 | 424 'tunstall', |
425 'ubnt', | |
426 'ubuntu', | |
427 'unity', | |
297 | 428 'universitaetsrechenzentrum', # University Computing Center |
429 'upload[0-9]*', | |
430 'user[0-9]*', | |
292 | 431 'USERID', |
297 | 432 'username', |
292 | 433 'usuario', |
434 'uucp', | |
435 'vagrant', | |
436 'vbox', | |
437 'ventrilo', | |
438 'vhbackup', | |
439 'virusalter', | |
440 'vmadmin', | |
441 'vmail', | |
297 | 442 'vscan', |
292 | 443 'vyatta', |
444 'wanadoo', | |
308
edd1e3b444e7
Blacklist more users on SSH including bugzilla
IBBoard <dev@ibboard.co.uk>
parents:
305
diff
changeset
|
445 'web', |
292 | 446 'weblogic', |
447 'webmaster', | |
297 | 448 'webportal', |
292 | 449 'WinD3str0y', |
450 'wine', | |
297 | 451 'wordpress', |
292 | 452 'wp-?user', |
453 'write', | |
454 'www', | |
297 | 455 'wwAdmin', |
456 '(www|web|coin|fax|sys|db2|rsync|tc)-?(adm(in)?|run|users?|data|[0-9]+)', | |
292 | 457 'xbian', |
458 'xbot', | |
297 | 459 'xmpp', |
292 | 460 'xoadmin', |
461 'yahoo', | |
462 'yarn', | |
463 'zabbix', | |
464 'zimbra', | |
465 'zookeeper', | |
297 | 466 # And some passwords that turned up as usernames |
467 '1q2w3e4r', | |
468 'abc123', | |
292 | 469 '0fordn1on@#\$%%\^&', |
470 'P@\$\$w0rd', | |
297 | 471 'P@ssword1!', |
472 'Passwd123', | |
473 'pass123?4?', | |
474 'qwer?[0-9]+', | |
292 | 475 ] |
476 | |
477 file { '/etc/fail2ban/filter.d/ibb-sshd-bad-user.conf': | |
478 content => epp('fail2ban/ibb-sshd-bad-user.epp', { 'bad_users' => $bad_users }), | |
479 } | |
480 # Because one of our rules checks fail2ban's log, but the service dies without the file | |
481 file { '/var/log/fail2ban.log': | |
482 ensure => present, | |
483 owner => 'root', | |
484 group => 'root', | |
485 mode => '0600', | |
486 } | |
487 } |