> as per you say "or even a text file", I'd created a text file which is > continuous edit with MySQL query like "mysql -uuser -ppassword -Ddb_name -N > -e 'SELECT GROUP_CONCAT(fw_ip) FROM (fail2ban_whitelist);' > /tmp/test.txt", > and after putting it to the jail.local at -> ignorecommand and restart the > fail2ban it will through error like > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 2018-03-27 05:20:39,172 fail2ban [20280]: CRITICAL Unhandled > exception in Fail2Ban: > Traceback (most recent call last): > File > "/usr/lib/python2.7/site-packages/fail2ban-0.9.6-py2.7.egg/fail2ban/server/jailthread.py", > line 66, in run_with_except_hook > run(*args, **kwargs) > File > "/usr/lib/python2.7/site-packages/fail2ban-0.9.6-py2.7.egg/fail2ban/server/filtersystemd.py", > line 272, in run > *self.formatJournalEntry(logentry)) > File > "/usr/lib/python2.7/site-packages/fail2ban-0.9.6-py2.7.egg/fail2ban/server/filter.py", > line 475, in processLineAndAdd > if self.inIgnoreIPList(ip, log_ignore=True): > File > "/usr/lib/python2.7/site-packages/fail2ban-0.9.6-py2.7.egg/fail2ban/server/filter.py", > line 395, in inIgnoreIPList > "(?<=b)1+", bin(DNSUtils.addr2bin(s[1]))).group()) > File > "/usr/lib/python2.7/site-packages/fail2ban-0.9.6-py2.7.egg/fail2ban/server/filter.py", > line 976, in addr2bin > return struct.unpack("!L", socket.inet_aton(ipstring))[0] > error: illegal IP address string passed to inet_aton > > > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > I'd done lot's of surfing to resolve this issue, but it can't be resolved by > me, is there any solution of this from your side?
Reading the error message it appears that your IP addresses are malformed (error: illegal IP address string passed to inet_aton). How does /tmp/test.txt look like? What do you get if you run the ignorecommand manually for some IP that is/isn’t in the file? Just a side note: You shouldn’t be continuously updating the file. You should run a timed batch job typically by cron or systemd. br, Petri
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Fail2ban-users mailing list Fail2ban-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fail2ban-users