Set up fail2ban on Ubuntu with an nftables SSH jail, ignoreip allowlist, recidive bans, a custom filter and a health-check ...
Your old Android phone has plenty left to offer as a home server.