On 2006.02.03, Cynthia Kiser <[EMAIL PROTECTED]> wrote: > Quick question - I am trying to do some IP restricting using a > registered filter in AOLserver. But ns_conn peeraddr returns > 127.0.0.1. That might be reasonable given that I am proxying > requests. However, when I look at the access log, I see the external > IP address for the request (131.215.x.y). What gives? Is there > another part of the Tcl API I should be calling to get the IP that > ns_log is getting? This in AOLserver 4.0.10. > > By the way, in AOLserver 3.3ad13, both the access log and ns_conn > peeraddr return the IP address to which the server is bound, > 127.0.0.1 - not what I want, but at least it is consistent.
Yeah, a change was made to nslog to log the X-Forwarded-For: header (without any kind of whitelist controls, d'oh). In your registered filter, you probably want to look at [ns_conn headers] and [ns_set iget $set x-forwarded-for] ... -- Dossy -- Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/ Panoptic Computer Network | http://panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
