Hello everyone,
Recently, I have remarked a bunch of bot entries in my nginx access log file. Before that, fail2ban bot filter seemed to work fine. So I have looked in my fail2ban log file and it's full of error. It is the config by default, I've never modified it. I've tried to update fail2ban and ip6tables, but I cant find any package manager in the docker. I wonder if anyone know how to fix that. Here the error message:
2017-09-21 16:13:21,035 fail2ban.server [261]: INFO --------------------------------------------------
2017-09-21 16:13:21,035 fail2ban.server [261]: INFO Starting Fail2ban v0.10.0a1
2017-09-21 16:13:21,035 fail2ban.server [261]: INFO Daemon started
2017-09-21 16:13:21,038 fail2ban.database [261]: INFO Connected to fail2ban persistent database '/config/fail2ban/fail2ban.sqlite3'
2017-09-21 16:13:21,039 fail2ban.jail [261]: INFO Creating new jail 'nginx-http-auth'
2017-09-21 16:13:21,040 fail2ban.jail [261]: INFO Jail 'nginx-http-auth' uses poller
2017-09-21 16:13:21,041 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,041 fail2ban.jail [261]: INFO Initiated 'polling' backend
2017-09-21 16:13:21,042 fail2ban.filter [261]: INFO Added logfile = /config/log/nginx/error.log (pos = 7134, hash = e98d121622aabfa4a1a34b1d636c2af5)
2017-09-21 16:13:21,043 fail2ban.filter [261]: INFO Set maxRetry = 5
2017-09-21 16:13:21,043 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,044 fail2ban.actions [261]: INFO Set banTime = 600
2017-09-21 16:13:21,044 fail2ban.filter [261]: INFO Set findtime = 600
2017-09-21 16:13:21,047 fail2ban.jail [261]: INFO Creating new jail 'nginx-botsearch'
2017-09-21 16:13:21,047 fail2ban.jail [261]: INFO Jail 'nginx-botsearch' uses poller
2017-09-21 16:13:21,047 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,048 fail2ban.jail [261]: INFO Initiated 'polling' backend
2017-09-21 16:13:21,049 fail2ban.filter [261]: INFO Added logfile = /config/log/nginx/access.log (pos = 480286, hash = 7cdbb6fa5cd3b6fb68a493f221b06792)
2017-09-21 16:13:21,049 fail2ban.filter [261]: INFO Set maxRetry = 2
2017-09-21 16:13:21,050 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,050 fail2ban.actions [261]: INFO Set banTime = 600
2017-09-21 16:13:21,050 fail2ban.filter [261]: INFO Set findtime = 600
2017-09-21 16:13:21,054 fail2ban.jail [261]: INFO Creating new jail 'nginx-badbots'
2017-09-21 16:13:21,054 fail2ban.jail [261]: INFO Jail 'nginx-badbots' uses poller
2017-09-21 16:13:21,054 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,054 fail2ban.jail [261]: INFO Initiated 'polling' backend
2017-09-21 16:13:21,055 fail2ban.filter [261]: INFO Added logfile = /config/log/nginx/access.log (pos = 480286, hash = 7cdbb6fa5cd3b6fb68a493f221b06792)
2017-09-21 16:13:21,056 fail2ban.filter [261]: INFO Set maxRetry = 2
2017-09-21 16:13:21,056 fail2ban.filter [261]: INFO Set jail log file encoding to UTF-8
2017-09-21 16:13:21,057 fail2ban.actions [261]: INFO Set banTime = 600
2017-09-21 16:13:21,057 fail2ban.filter [261]: INFO Set findtime = 600
2017-09-21 16:13:21,065 fail2ban.jail [261]: INFO Jail 'nginx-http-auth' started
2017-09-21 16:13:21,066 fail2ban.jail [261]: INFO Jail 'nginx-botsearch' started
2017-09-21 16:13:21,068 fail2ban.jail [261]: INFO Jail 'nginx-badbots' started
2017-09-21 16:13:21,113 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-http-auth
ip6tables -w -A f2b-nginx-http-auth -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-http-auth -- stderr:
2017-09-21 16:13:21,113 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,113 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,113 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,114 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,114 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,114 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,114 fail2ban.utils [261]: ERROR -- stderr: 'Could not open socket to kernel: Address family not supported by protocol'
2017-09-21 16:13:21,114 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-http-auth
ip6tables -w -A f2b-nginx-http-auth -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-http-auth -- returned 1
2017-09-21 16:13:21,114 fail2ban.actions [261]: ERROR Failed to start jail 'nginx-http-auth' action 'iptables-multiport': Error starting action Jail('nginx-http-auth')/iptables-multiport
2017-09-21 16:13:21,125 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-botsearch
ip6tables -w -A f2b-nginx-botsearch -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-botsearch -- stderr:
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR -- stderr: 'Could not open socket to kernel: Address family not supported by protocol'
2017-09-21 16:13:21,126 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-botsearch
ip6tables -w -A f2b-nginx-botsearch -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-botsearch -- returned 1
2017-09-21 16:13:21,126 fail2ban.actions [261]: ERROR Failed to start jail 'nginx-botsearch' action 'iptables-multiport': Error starting action Jail('nginx-botsearch')/iptables-multiport
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-badbots
ip6tables -w -A f2b-nginx-badbots -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-badbots -- stderr:
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: "modprobe: can't change directory to '/lib/modules': No such file or directory"
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: "ip6tables v1.6.1: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)"
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: 'Perhaps ip6tables or your kernel needs to be upgraded.'
2017-09-21 16:13:21,138 fail2ban.utils [261]: ERROR -- stderr: 'Could not open socket to kernel: Address family not supported by protocol'
2017-09-21 16:13:21,139 fail2ban.utils [261]: ERROR ip6tables -w -N f2b-nginx-badbots
ip6tables -w -A f2b-nginx-badbots -j RETURN
ip6tables -w -I INPUT -p tcp -m multiport --dports http,https -j f2b-nginx-badbots -- returned 1
2017-09-21 16:13:21,139 fail2ban.actions [261]: ERROR Failed to start jail 'nginx-badbots' action 'iptables-multiport': Error starting action Jail('nginx-badbots')/iptables-multiport
EDIT: Those errors are present since 2017-07-25 at least (no more log after this date).