want fail2ban

Hi, I am new to centos and yum. To get fail2ban, the docs say "yum install fail2ban". Says it cannot find it. Am I doing something wrong?

Btw, how do I query yum to make sure it is actually hitting the server I think it is? I already followed the steps in:

https://www.linode.com/docs/platform/package-mirrors

Thanks for the help,

Jim

4 Replies

Fail2ban is included in the Extra Packages for Enterprise Linux (EPEL) repository run by Fedora. You should be able to enable EPEL in CentOS by running yum install epel-release.

Running yum repolist will show the currently enabled repositories. See the man page for yum for more ways to list repositories.

Thanks Vance!

That did the trick. Yes I should have looked closer at man/info page. Guess I got overwhelmed.

Jim

No problem. It's not at all surprising that people coming from other distributions (like Debian and many of its derivatives) would be confused that so few packages are provided by the CentOS base repository. The wiki does a good job of explaining how to enable third-party repositories, but the trick is knowing that's what you need in the first place.

Install fail2ban.

If you want Fail2ban to send an email when someone has been banned, you have to configure SSMTP (for example).

systemd

Enable the fail2ban.service unit.

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct