<p>I want to prevent brute force attacks to my services on Kubernetes. My solution is to ban IPs that have many failed attempts but every request will be SNAT (Source NAT) and I don't know what can I do. Is there Any proxy I can use for my TCP requests and after that I can ban IPs?</p>

Ali Rezvani
<p>If You are using a database to your service and facing this brutal attack by more failed attempts then you can block those IP's or users for some time and can release them. Database-persisted short lockout period for the given account (1-5 minutes) is the only way to handle this. Each <code>userid</code> in your database contains a <code>timeOfLastFailedLogin</code> and <code>numberOfFailedAttempts</code>. When <code>numbeOfFailedAttempts &gt; X</code> you can lockout for some minutes.</p>
<p>Refer to this <a href="https://stackoverflow.com/questions/424210/preventing-brute-force-logins-on-websites">SO</a> and <a href="https://community.f5.com/t5/technical-articles/how-to-persist-real-ip-into-kubernetes/ta-p/291165" rel="nofollow noreferrer">Doc</a> for More information.</p>
