<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>G'day Liegh and Tim<br>
<br>
That works great, thanks. Exactly what I was looking for. <br>
<br>
None of our clients will be behind remote proxies for internal traffic. <br>
These sites are only visible internally and not to the external internet. <br>
There are multiple internal DNS Servers managed by the corporate IT, so they "should be" trustworthy for internal reverse lookup. <br>
<br>
One thing that might break the solution is trying to access these queries via VPN.&nbsp;&nbsp; <br>
<br>
Thanks again.<br>
<br>
Andrew Dent<br>
<br>
<br>
<br>
Tim Hogard and Leigh Sharpe wrote:
<blockquote cite="mid:200902100049.n1A0ntRl034836@v.abnormal.com" type="cite">
  <blockquote type="cite"><pre wrap="">%ENV{'REMOTE_ADDR '} should contain the IP address of the client. Try<br>
this:<br>
=20<br>
-----<br>
=20<br>
#!/usr/bin/perl<br>
print "content-type:text/html\n\n&lt;html&gt;&lt;body&gt;\n";<br>
foreach(keys(%ENV))<br>
{<br>
        print "$_ =3D $ENV{$_}&lt;BR&gt;\n";<br>
}<br>
print "&lt;/body&gt;&lt;/html&gt;\n";<br>
<br>
</pre></blockquote>
  <pre wrap=""><!----><br>
If the rmote is behind a an honest proxy it may give you this to:<br>
 HTTP_X_FORWARDED_FOR<br>
<br>
Also<br>
</pre>
  <blockquote type="cite"><pre wrap="">%ENV{'REMOTE_ADDR'} should contain the IP address of the client. Try<br>
</pre></blockquote>
  <pre wrap=""><!---->                   ^ no space...<br>
<br>
<br>
Other comments...<br>
reverse DNS is often very slow and may timeout.<br>
maxmind has a free database and perl module that has IP-&gt;country code<br>
mappings.<br>
You can't trust anyones reverse IP.<br>
You also need to make sure your CGI program framework can't over write the<br>
REMOTE_ADDR.<br>
<br>
-tim</pre>
</blockquote><BR></HTML>