Dietpi Version 159 Fail2Ban error 255

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
cashflys
Posts: 1
Joined: Fri Nov 17, 2017 10:52 pm

Dietpi Version 159 Fail2Ban error 255

Post by cashflys »

Sorry, first post, and still figuring out the bug reporting stuff.

Raspberry Pi3, Clean install of Dietpi 159. Hotspot enabled and used fix in post here:
https://github.com/Fourdee/DietPi/issues/1299

Now having issues with Fail2Ban errors and service failure. Here is the service status:

● fail2ban.service - Fail2Ban Service
Loaded: loaded (/lib/systemd/system/fail2ban.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-01-02 18:35:56 GMT; 2min 2s ago
Docs: man:fail2ban(1)
Process: 864 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)

Jan 02 18:35:56 TASmedia systemd[1]: Failed to start Fail2Ban Service.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Unit entered failed state.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Service hold-off time over, scheduling rest
Jan 02 18:35:56 TASmedia systemd[1]: Stopped Fail2Ban Service.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Start request repeated too quickly.
Jan 02 18:35:56 TASmedia systemd[1]: Failed to start Fail2Ban Service.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Unit entered failed state.
Jan 02 18:35:56 TASmedia systemd[1]: fail2ban.service: Failed with result 'exit-code'.


Suggestions?
Dr.Jörn
Posts: 2
Joined: Sun Jan 28, 2018 1:00 pm

Re: Dietpi Version 159 Fail2Ban error 255

Post by Dr.Jörn »

Hi cashflys,

(this is the same post as http://dietpi.com/phpbb/viewtopic.php?f ... 460#p10460)
I had the exact same issue and resolved it. The error message actually hints to the first problem already. After installing fail2ban on a Raspberry Pi (B for me), the jail.conf has invalid settings. The first issue is with a double definition of [port] in the [pam-generic] section. It once says port = all and once port = anyport. I deleted the latter. A second issue is that in [DEFAULT] the action parameter is defined twice, whereas the second definition just states action = %(action_)s. I commented the that second definition out. Then I restarted fail2ban and it seems to work since then (at least it starts up and correctly logs wrong login attempts - so all it should do).
I hope this helps!

Btw, I followed https://github.com/owncloud/documentation/issues/3078 to secure owncloud with fail2ban (see instruction from dercorn further below)
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi Version 159 Fail2Ban error 255

Post by Fourdee »

Fixed in v6.1, workaround available below:
https://github.com/Fourdee/DietPi/issue ... -361299317
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply