3

The flood table IPs are listing the IP of the load balancer, not the one of the request, which is in the X_FORWARDED_FOR header.

I have the 'reverse_proxy' set to TRUE in setting.php, and it works with the CDN as expected, but not with the flood table.

The site hosted at AWS using the CloudFront CDN.

How can I make the flood table look at the IP reported in the X_FORWARDED_FOR header?

  • ip_address() should check for X_FORWARDED_FOR if reverse_proxy is set to true, might be worth stepping through that function with an appropriate request to see what's happening – Clive Sep 28 '13 at 15:11
  • it's odd. I setup an new load balancer pointing to a new ec2 instance, and the X_FORWARDED_FOR is being properly set and respected in the flood table. I'd rather not have to setup debugging in prod if it's at all avoidable. – trimbletodd Oct 2 '13 at 21:08
  • I did a quick test in prod, and the X_FORWARDED_FOR headers are set. However, I just had to clear the flood table of ips from my load balancer. – trimbletodd Oct 2 '13 at 21:16
  • Now my followup question to this is how to handle a revolving ip... – trimbletodd Oct 8 '13 at 20:13
2

$conf['reverse_proxy_addresses'] had my old load balancer IP, thanks to AWS changing the IP without telling me. Once I updated with the current LB address, it worked as expected.

Not the answer you're looking for? Browse other questions tagged or ask your own question.