[ic] IP address of user

Orko interchange-users@interchange.redhat.com
Tue Apr 23 18:49:01 2002


On Tue, 2002-04-23 at 13:05, Steve Graham wrote:
> Hello,
> 
> I am trying to restrict the admin section of our catalog to specific local 
> ip address using the .access & .access_gate.
> 
> Here is what I have in the .access_gate file, but host will do a dns reverse 
> lookup to determine the domain (if not local), and I just need the ip 
> address. Any suggestions?
> 
> *: [if session host eq '196.168.11.11']Yes[else]No[/else][/if]

Try: 

$Tag->env( 'REMOTE_ADDR' );

or on some servers I think it's 'REMOTE_ADDRESS'

so in your example, it would be:

*: [calc] if ( $Tag->env( 'REMOTE_ADDR' ) eq '196.168.11.11' ){return
'Yes'} return 'No';[/calc]

That should work.  I have Ed's [env] usertag installed, so you might
need to get that if the [env] doesn't work. It was posted on the list a
while back.  Don't have it handy right now.  To test to see if it will
work, just put a [env REMOTE_ADDR] on a test IC page and it should print
your IP address.

Hope this helps,

-- orko

> 
> Thanks,
> Steve
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
> 
> 
> 
> 
> 
> 
> 
-- 
Office: (360)697-1603
  Cell: (360)271-0796