LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 12-08-2018, 11:46 AM   #1
fbeye
Member
 
Registered: Aug 2017
Posts: 49

Rep: Reputation: Disabled
Question about Fail2ban setting utilizing the ‘backend’ option.


Hello!

Was wondering if anyone here was using fail2ban (in a Slackware environment).
The backend option is used to pick up any changes in the logs, so I am to believe.

I currently have each jail I am using use /var/log/maillog (for dovecote and postfix) and have backend commented out (#). Is this alright? I do so because if it is enabled to either auto or polling I get a “Jail is not a part of the JournalFilter instance” and I have no idea what that means.

Any suggestions?
 
Old 12-10-2018, 01:35 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665Reputation: 6665
I only use fail2ban to manage my ssh logs, and I have backend set to auto in my /etc/fail2ban/jail.local and the backend for sshd to be the default of %(sshd_backend)s
 
Old 12-14-2018, 02:09 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by fbeye View Post
Hello!

Was wondering if anyone here was using fail2ban (in a Slackware environment).
The backend option is used to pick up any changes in the logs, so I am to believe.

I currently have each jail I am using use /var/log/maillog (for dovecote and postfix) and have backend commented out (#). Is this alright? I
Sure, butt...
it means that f2b will use the [ DEFAULT ]
for any missing or not declared directive
My [ DEFAULT ]
Code:
[DEFAULT]
ignoreip = {space separated list of "safe" IPs Never to be banned}
bantime  = 86400
findtime = 600
maxretry = 1
backend = polling
destemail = email@domain.com
banaction = my_custom_banaction
mta = sendmail
protocol = tcp
chain = INPUT
loglevel = 3
usedns = yes

# "backend" specifies the backend used to get files modification.
# auto: will try to use the following backends, in order:
backend = auto

In your jail.local (just a copy of jail.conf)
There is a
[ DEFAULT ]
stanza.

the entry provided by the f2b author is
Code:
[dovecot]

enabled = false
port    = smtp,ssmtp,submission,imap2,imap3,imaps,pop3,pop3s
filter  = dovecot
logpath = /var/log/mail.log
and I see no "backend" directive so, it looks for use the polling directive from
my [ DEFAULT ]

all documented in /etc/fail2ban/jail.conf
Code:
# "backend" specifies the backend used to get files modification.
# Available options are "pyinotify", "gamin", "polling" and "auto".
# This option can be overridden in each jail as well.
#
# pyinotify: requires pyinotify (a file alteration monitor) to be installed.
#            If pyinotify is not installed, Fail2ban will use auto.
# gamin:     requires Gamin (a file alteration monitor) to be installed.
#            If Gamin is not installed, Fail2ban will use auto.
# polling:   uses a polling algorithm which does not require external libraries.
# auto:      will try to use the following backends, in order:
#            pyinotify, gamin, polling.
backend = auto
My advice is make a copy of /etc/fail2ban/jail.conf as /etc/fail2ban/jail.local and stick only the enabled jails in there.
The file /etc/fail2ban/jail.local survives upgrades.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Brother HL-2240-R Stopped - Backend /usr/lib/cups/backend/usb does not exist! jet222jet Linux - Hardware 2 12-28-2020 06:32 PM
Configur sftp chroot utilizing Windows DFS as the backend storage itanium3 Linux - Newbie 2 10-02-2015 03:16 PM
Configur sftp chroot utilizing Windows DFS as the backend storage itanium3 Linux - Newbie 0 10-01-2015 10:44 AM
[SOLVED] Debian OpenLDAP Question: Custom LDAP Schemas Without Utilizing slapd.conf mattseanbachman Linux - Server 1 03-02-2010 04:54 AM
Turn KnoppMyth backend/frontend into backend only nebbus Linux - General 0 09-09-2007 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration