[Bug 215120] security/py-fail2ban: fail2ban fails to ban IP address

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 7 15:30:55 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215120

            Bug ID: 215120
           Summary: security/py-fail2ban: fail2ban fails to ban IP address
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: olaf at zaplinski.de
                CC: theis at gmx.at
             Flags: maintainer-feedback?(theis at gmx.at)
                CC: theis at gmx.at

I just (re-) installed this port and added these files.


*** fail2ban.local:

[Definition]
loglevel = DEBUG


*** jail.local:

[DEFAULT]
# -- 3 Tage:
bantime = 259200

[bsd-sshd]
enabled = true
port = ssh
filter = bsd-sshd
logpath = /var/log/auth.log
banaction = zap-em


*** action.d/zap-em.conf:

[Definition]
actionban = ipfw table 1 add <ip>
actionunban = ipfw table 1 delete <ip>


Interesting is the log file's last line here:

2016-12-07 17:28:39,840 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'addaction', 'zap-em']
2016-12-07 17:28:39,840 fail2ban.CommandAction  [17952]: DEBUG   Set action
zap-em timeout = 60
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Set
actionstart =
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Set actionban
=
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Set
actionunban =
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Set
actioncheck =
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Set actionstop
=
2016-12-07 17:28:39,841 fail2ban.CommandAction  [17952]: DEBUG   Created <class
'fail2ban.server.action.CommandAction'>
2016-12-07 17:28:39,842 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'actionban', 'ipfw table 1 add <ip>']
2016-12-07 17:28:39,842 fail2ban.CommandAction  [17952]: DEBUG   Set actionban
= ipfw table 1 add <ip>
2016-12-07 17:28:39,842 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'actionunban', 'ipfw table 1 delete
<ip>']
2016-12-07 17:28:39,842 fail2ban.CommandAction  [17952]: DEBUG   Set
actionunban = ipfw table 1 delete <ip>
2016-12-07 17:28:39,843 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'port', 'ssh']
2016-12-07 17:28:39,843 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'protocol', 'tcp']
2016-12-07 17:28:39,844 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'name', 'bsd-sshd']
2016-12-07 17:28:39,844 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'chain', 'INPUT']
2016-12-07 17:28:39,844 fail2ban.transmitter    [17952]: DEBUG   Command:
['set', 'bsd-sshd', 'action', 'zap-em', 'bantime', '259200']
2016-12-07 17:28:39,845 fail2ban.transmitter    [17952]: DEBUG   Command:
['start', 'bsd-sshd']
2016-12-07 17:28:39,845 fail2ban.jail           [17952]: INFO    Jail
'bsd-sshd' started
2016-12-07 17:28:39,846 fail2ban.filterpyinotify[17952]: DEBUG   pyinotifier
started for bsd-sshd.
2016-12-07 17:28:39,847 fail2ban.action         [17952]: DEBUG
2016-12-07 17:28:39,851 fail2ban.action         [17952]: DEBUG   Nothing to do


The last line is missing in my Linux server's fail2ban log, and there fail2ban
does a great job. But this FreeBSD port does not block sshd abusers at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list