Re: Where am I ...
| From: | Ashley Sheridan | Date: | Fri, 25 Jul 2014 22:27:29 +0000 |
| Subject: | Re: Where am I ... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323665@lists.php.net to get a copy of this message | ||
I've had this before on a load balanced environment, and the original ip was being stuffed into
another (custom) header (can't remember what just now)
On 25 July 2014 19:16:36 BST, Lester Caine <lester@lsces.co.uk> wrote:
>Not exactly a PHP problem, but a number of my sites are now being
>plagued by the fallout from it.
>
>gethostbyaddr($_SERVER["REMOTE_ADDR"]);
>Has worked perfectly for many years now, so I know exactly which Desk
>or
>Counter is trying to log in, and I can direct announcements to the
>correct location.
>
>Some of you will already have spotted the current problem ... VDI ...
>This reports a host name based on the VDI desktop accessed from the
>'farm' which whilst irritating since one has to keep changing it each
>day, is actually changing even during a 'session' so a caller ticket is
>accessed, and can take over an hour at times to deal with, by which
>time
>the VDI number has changed, and you can't clear the ticket :(
>
>We can switch to manually specifying the location as part of the login
>process, butit's all to easy to select the wrong Desk especially if you
>were working on an adjacent one a previous day.
>
>To my way of thinking, the IP address should be for the physical
>machine
>that we are working with? So if the MAC address has an IP address
>locked
>to that machine then I should be able to simply drop back to that and
>ignore the host name? But I'm being told that $_SERVER["REMOTE_ADDR"]
>may not be the local IP address?
>
>Anybody got some insight into how we can get around this problem? My
>particular beef with the way things are currently being run is that the
>networ team seem to have no idea in the case of a suspicious access
>attempt even which building the offender is located let alone what
>desk,
>and I can't believe that is acceptable security practice?
Thanks,
Ash