Forum Discussion

Brian_Moyles_10's avatar
Brian_Moyles_10
Icon for Nimbostratus rankNimbostratus
Aug 31, 2007

Insert client IP?

So I'm trying to insert the original client IP in a header so I can use that in apache logging. I was originally using x-forwarded-for, but that screws things up since x-forwarded-for can be a comma-separated list of ips.

 

 

My rule looks like this:

 

when HTTP_REQUEST {

 

HTTP::header insert ORIG_IP [IP::remote_addr]

 

}

 

 

that works for a majority of connections, but if I look at the ltm logs, I see a TON of

 

Aug 31 13:11:08 tmm tmm[818]: 01220001:3: TCL error: Rule insert_orig_ip EQUEST> - Operation not supported (line 1) invoked from within "HTTP::header

 

insert ORIG_IP [IP::remote_addr]"

 

 

I'm not sure what operation isn't supported here... Am I missing something? Again, this doesn't seem to happen on EVERY request, but a fair amount do...

1 Reply

  • Are you able to repro the failure? Or does it happen often enough that you could enable additional logging (of the client IP, requested URI, etc) in the iRule to see if there is any pattern to when the error occurs?

     

     

    Inserting a new header should be a fairly straightforward task, so I'm not sure why you'd be seeing intermittent errors.

     

     

    What version of software are you running?

     

     

    Aaron