Error when starting fail2ban if sshd enabled

I made a copy of jail.conf to jail.local. In which I uncomment the line to enable sshd:

enabled = true

When I reload fail2ban I get the following error:

[xxx@xxxxxxxx ~]# fail2ban-client reload
ERROR  Failed during configuration: File contains no section headers.
file: /etc/fail2ban/jail.local, line: 24
'enabled = true\n'

I have looked 2 hours on internet without finding out why I get this error.

Any help will be very apreciate.

2 Replies

I don't use fail2ban, but


is usually a comment.

Try just


Thanks! and so simple!!! a shame.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct