I have an EC2 machine running behind the AWS Application Load Balancer. I have set up mod_evasive (for DDOS protection).
The issue is that whenever a client requests to the Load Balancer then it forwards its own IP, not the actual IP of the client. I also implemented X-Forward-Header to get the real IP of the client request and it blocked that IP successfully. The main problem lies here, when the client makes the request again to the Load Balancer then this request reaches to EC2 again because of the Load Balancer's IP address. I can't block Load Balancer IP.
Is there any workaround for that? Any suggestion?