Questions tagged [fail2ban]

Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the malicious signs -- too many password failures, seeking for exploits, etc.

Fail2ban scans log files and bans IPs that show the malicious signs -- too many password failures, seeking for exploits, etc.

87 questions
51
votes
5 answers

vivid - failed to connect to upstart: connection refused

Just updated via do-release-upgrade and now certain upstart jobs such as fail2ban and plexmediaserver will not start (have tried reinstalling) $ sudo service fail2ban start Job for fail2ban.service failed. See "systemctl status fail2ban.service" and…
matty87a
  • 511
48
votes
3 answers

potential ufw and fail2ban conflicts

Will running both fail2ban and ufw cause problems? I noticed that fail2ban modifies iptables rules, but ufw already has a ton of iptables rules defined... so I'm not sure if fail2ban will mess these up.
Adam Monsen
  • 2,161
40
votes
3 answers

How do you view all of the banned IP's for Ubuntu 12.04 via the command line?

I can't seem to find a quick command to just view all the banned IP's on the server. Or is there a file I can just edit? I'm guessing fail2ban is the one that inputs all the IP's to ban. Where do I adjust the settings for it? I seem to be able to…
17
votes
2 answers

IP getting access even after blocking

78.128.113.62 - - [04/Jan/2020:19:59:33 +0530] "GET /efk-dashboard HTTP/1.1" 404 66914 "-" "python-requests/2.13.0" There are multiple access records like this even after I have run the commands ufw deny from 78.128.113.58/24 to any # for ufw ip…
Joshi
  • 343
13
votes
3 answers

How do I tell if my brute force protection (fail2ban) is running?

I'm not sure if my fail2ban is running. How can I tell if it's currently running? Also, how do I tell if it is even running on startup?
10
votes
5 answers

Fail2Ban or DenyHosts to block invalid username SSH login attempts

Is there a way to automatically block IP address when a user tries to login as any invalid username? I already have: [ssh] enabled = true port = ssh filter = sshd logpath = /var/log/auth.log maxretry = 3 bantime = 31536000 in…
slayton1213
  • 115
  • 2
  • 2
  • 8
7
votes
4 answers

Fail2ban fails to start after update?

I have been using fail2ban for a while on my Ubuntu server. Recently (after upgrading to ubuntu 15.04 I assume) fail2ban has been failing to start. Initially, this was because the port option had been specified twice somewhere - I fixed that. Now I…
7
votes
1 answer

Why /var/log/auth.log is using diffrent timezone?

I've installed fail2ban on a Ubuntu box (14.04) but it didn't work correctly. As I tried to inspect the reason, I discovered that the timezone which is being used by the /var/log/auth.log file is different from the system timezone. Here were what I…
Minh Danh
  • 454
7
votes
1 answer

Block badbot with fail2ban via user agents in access.log

How can I create a filter to block these with fail2ban? 476 Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/) 892 ltx71 - (http://ltx71.com/) 5367 Mozilla/5.0 (compatible; DotBot/1.1;…
alebal
  • 473
6
votes
3 answers

Fail2ban Error on start

Recently, I have tried restarting Fail2ban and I have received an error, making it impossible to start... The full error I received from systemctl status fail2ban is as follows: Jan 03 18:27:02 nerdofcode.com systemd[1]: fail2ban.service: Control…
NerdOfCode
  • 2,608
6
votes
1 answer

unable to install fail2ban on ubuntu 18.04

I installed ubuntu server(18.04 version) a few days ago. and I tried to install fail2ban with apt tool but couldn't do that. Here's some information on my situation. root@ubuntu:~# cat /etc/os-release | grep -i version VERSION="18.04.1 LTS (Bionic…
NoFence
  • 799
5
votes
2 answers

Job for fail2ban.service failed because the control process exited with error code

I have installed fail2ban on my server (OS: Ubuntu 16.0.4 LTS). When I try to start it, I get the following error message: Job for fail2ban.service failed because the control process exited with error code. Here are the outputs for various…
5
votes
1 answer

Why does fail2ban report my auth.log file as removed?

I have logwatch running and I check every morning it's content. I have noticed that my auth.log file is erased after an apt upgrade and reboot. Here is the fail2ban section of the logwatch after an upgrade and reboot yesterday. ---------------------…
chmike
  • 1,014
5
votes
1 answer

How should I write the fail2ban -> apache-badbots.conf rules?

I often have to add new rules to the apache-badbots.conf file, and every time I have the doubt that it no longer works... For example, this is my current apache-badbots.conf file: [Definition] badbotscustom =…
alebal
  • 473
5
votes
1 answer

fail2ban actions to broaden the banned IP range

Is there a way to have fail2ban ban the entire class C network from which a ban address comes from? A
A.Adverse
  • 305
  • 1
  • 3
  • 11
1
2 3 4 5 6