Merge pull request 'fail2ban declares the log its own recidive jail reads' (#134) from fix/fail2ban-declares-the-log-its-own-jail-reads into main
This commit was merged in pull request #134.
This commit is contained in:
@@ -28,13 +28,6 @@
|
|||||||
"path": "/etc/fail2ban/action.d",
|
"path": "/etc/fail2ban/action.d",
|
||||||
"mode": "0755"
|
"mode": "0755"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "fail2ban-local",
|
|
||||||
"type": "file",
|
|
||||||
"path": "/etc/fail2ban/fail2ban.local",
|
|
||||||
"mode": "0644",
|
|
||||||
"content": "[Definition]\n\n# Where fail2ban writes its own log, declared rather than assumed. The recidive jail reads\n# this file to ban whoever keeps coming back, and the logrotate file this module ships\n# rotates it -- but nothing told fail2ban to write there. Where the package default stands,\n# fail2ban logs to the journal, the recidive jail finds no log file, and the whole service\n# refuses to start, taking the sshd jail with it.\n#\n# In .local, not in fail2ban.conf: that file belongs to the package.\nlogtarget = /var/log/fail2ban.log\n"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "jail-local",
|
"id": "jail-local",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
@@ -49,6 +42,14 @@
|
|||||||
"mode": "0644",
|
"mode": "0644",
|
||||||
"content": "[sshd]\nenabled = true\nport = ssh\nlogpath = %(sshd_log)s\nbackend = %(sshd_backend)s\nmaxretry = 5\n"
|
"content": "[sshd]\nenabled = true\nport = ssh\nlogpath = %(sshd_log)s\nbackend = %(sshd_backend)s\nmaxretry = 5\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "log",
|
||||||
|
"type": "file",
|
||||||
|
"path": "/var/log/fail2ban.log",
|
||||||
|
"mode": "0640",
|
||||||
|
"create-once": true,
|
||||||
|
"content": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "jail-recidive",
|
"id": "jail-recidive",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
@@ -77,7 +78,6 @@
|
|||||||
"state": "running",
|
"state": "running",
|
||||||
"boot": "enabled",
|
"boot": "enabled",
|
||||||
"restart-on": [
|
"restart-on": [
|
||||||
"fail2ban-local",
|
|
||||||
"jail-local",
|
"jail-local",
|
||||||
"jail-sshd",
|
"jail-sshd",
|
||||||
"jail-recidive",
|
"jail-recidive",
|
||||||
|
|||||||
Reference in New Issue
Block a user