Perlbal and CGI::remote_host returning 127.0.0.1
    Ask Bjørn Hansen 
    ask at develooper.com
       
    Wed Sep 26 08:53:28 UTC 2007
    
    
  
On Sep 25, 2007, at 21:04, Igor Chudov wrote:
> My question is, how do I make mod_perl and CGI module report actual
> remote host as $cgi->remote_host, as opposed to getting 127.0.0.1.
For Apache 2.2 I use this module:
	http://www.openinfo.co.uk/apache/index.html
In mod_perl (1.x) the following should work:
httpd.conf:
   PerlPostReadRequestHandler ProxyIP
And then put something similar to the ProxyIP::handler function in  
your startup.pl:
    https://svn.develooper.com/combust/trunk/apache/conf/startup.pl
($config->proxyip_forwarders there returns a list of IPs, optionally  
with netmasks or '*' to just allow everyone).
The Perl version here traverses all the "trusted" upstream proxies  
and sets the IP to the first "untrusted" IP found - I forget if the  
Apache module does that too.
  - ask
-- 
http://develooper.com/ - http://askask.com/
    
    
More information about the perlbal
mailing list