# Brute attack and /var/log/btmp
**/var/log/btmp` is a system security log that records all failed login attempts to your Linux server.**/var/log/btmpcat, nano, or less. If you try, your screen will fill with unreadable scrambled code.
- **Strict Permissions:** Because it logs failed login details (which sometimes accidentally contain real passwords typed into the username field), only the root user can read it.
---
last with the -f flag. Run this command with sudo:root, admin, or completely fake usernames like invalid).
- **Column 3:** The **IP address** of the machine or bot trying to break into your server.
---
/var/log/btmp to swell to hundreds of megabytes or gigabytes very quickly.2010, sophisticated automated bots will eventually scan your server, find the open port, and begin brute-forcing it./var/log/btmp file and find out exactly who is attacking you and if **Fail2ban** is doing its job.btmp file using this command:root, admin, user, or ubuntu. If you see actual personal usernames that exist on your system, it means the attack is more targeted.
2010 means you need to ensure Fail2ban is actually listening to that custom port. Otherwise, it will ignore the attacks.btmp log, Fail2ban might still be looking for port 22.
/etc/fail2ban/jail.local):port = 2010 is explicitly set.* If you make changes, restart the service:103.137.184.170 alone has hammered your custom SSH port over **216,000 times**.Journal matches: _SYSTEMD_UNIT=sshd.service), has banned 427 IPs total, and currently has 7 IPs blocked—including 211.253.8.115, which is number 10 on your top attackers list.[sshd] section and adjust these parameters:Ctrl+O, Enter, Ctrl+X) and restart Fail2ban:*103.137.184.170 has broken the threshold completely. You can force Fail2ban to ban it instantly without waiting for the next trigger:root user. If you haven't already, completely disable logging directly into the root account via SSH.PermitRootLogin and change it to no:meson user password or SSH key working before doing this, so you don't lock yourself out).*/var/log/btmp#PermitRootLogin prohibit-password is commented out, the system defaults to allowing root login attempts under certain conditions. Since you are using SSH keys for your user account, you should explicitly deny the root user from ever logging in.# symbol in front of it):Ctrl+O, Enter, Ctrl+X) and restart SSH:103.137.184.170, you should block it permanently at the firewall level so it cannot access your Nextcloud instance or any other port:insert 1 ensures this rule sits at the very top of your firewall checklist, blocking the packet instantly).*YOUR_HOME_IP with your actual public IP address, which you can find by searching "what is my IP" on your computer).*