vit has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I am using Perl/CGI for my web services and logging IPs from the users. From one of them I started getting 127.0.0.1 which is supposed to be local on
my $ip_ad = $ENV{'REMOTE_ADDR'};
What can be the reason and what should I do to get a real one?

Replies are listed 'Best First'.
Re: Getting IP 127.0.0.1 as REMOTE_ADDR
by chrestomanci (Priest) on Aug 26, 2011 at 14:52 UTC

    The most likely reason is that your hosting provider has set-up some sort of front end proxy between your CGI script and the public accessing them.

    You should probably check the documentation from your hosting provider. There is probably another environment variable available to get the real remote IP address.