The results of the first call to ip_address() on both D6 and D7 generate an invalid cached IP on one of our servers. We have a server running varnish / memcache + Domain Access.
Initially, during testing, no issues are found, but eventually the server becomes blacklisted. Even then, this issue remains hidden until someone complains, which is not very helpful for all of the site builders out there.
So I'd suggest a simple check of the $_SERVER variables to see if a potential issue can be detected and a warning on the status report page.
i.e. Something like...
$reverse_proxy = variable_get('reverse_proxy_header', 'HTTP_X_FORWARDED_FOR');
if (SERVER_ADDR == REMOTE_ADDR && (empty($reverse_proxy) || !isset($_SERVER[$reverse_proxy])) {
// return warning
}
if (SERVER_ADDR == ip_address() || in_array(SERVER_ADDR, $reverse_proxy_addresses)) {
// return warning
}
It seems like there are some users reporting similar issues, so this should in theory reduce the load on the support staff.
Comments
Comment #1
sunI agree that we should verify a correct IP setup, but this issue sounds like a duplicate of #1345422: Determine and show whether correct IP addresses are sent ?