I am running Asterisk with FreePBX. I would like to log all failed attempts and after a while ban them. Ideally after 3 failed attempts in 1 minute, ban for 1 hour. Is it possible to see if this attempt is repeated, then ban for 1 week.
Is it possible to set that up in iptables?
Even though I have an SSH key, I am concerned about security. Ports I am using are, some are changed: ssh (22), rtp (10000-20000), http (88), sip (5070).
At the moment, I do have GeoIP that allows only the countries that I want and block the rest. That does not cover me, since i could get hit from own country's users.
Also, I would like to allow the established connections. The main issue is that I have remote users that get dynamic IPs from their smartphones, so I can not use static IPs/dynamic dns. This is the reason for ban after so many requests.