Iāve only had a quick look, but Fail2ban looks interesting. The only downside of fail2ban is that it requires webserver access logging to function. This could further reduce the performance of all webserver stacks, especially when using āFullā rsyslog/logrotate logging mode.
Iāll take a indepth look into fail2ban in the near future.
Edit, updated ssh method:
If your only looking to control who connects to your SSH server, try the following:
use dietpi-software to change your SSH server to OpenSSH
edit /etc/ssh/sshd_config
Uncomment the line #ListenAddress 192.168.0.10
Change the IP address to the IP of your RPi device.