Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Getting IP 127.0.0.1 as REMOTE_ADDR

by vit (Friar)
on Aug 26, 2011 at 14:40 UTC ( [id://922657]=perlquestion: print w/replies, xml ) Need Help??

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://922657]
Approved by chrestomanci
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found