Forum Discussion

jrc-soc's avatar
jrc-soc
Icon for Nimbostratus rankNimbostratus
Nov 11, 2015

Operation not supported (line 3)invoked from within "HTTP::header remove x-forwarded-for"

Dears,

 

I have this error in my Big IP F5 3900 10.24.577:

 

TCL error: xxxxxxxxx - Operation not supported (line 3) invoked from within "HTTP::header remove x-forwarded-for"

 

Irule is:

 

when HTTP_REQUEST { strip all instances of the given header while {[HTTP::header exists x-forwarded-for]}{ HTTP::header remove x-forwarded-for } HTTP::header insert X-Forwarded-For [IP::remote_addr] set http_request_time [clock clicks -milliseconds] ........

 

How can I modify it to avoid this error?

 

Any suggestion will be welcome.

 

Fabrizio.

 

4 Replies

  • BinaryCanary_19's avatar
    BinaryCanary_19
    Historic F5 Account
    Please re-post the irule, and use the "preformatted/code" option in the editor when pasting it. Paste the full irule if possible, and obfuscate any sensitive parts that if necessary, without altering the meaning of the irule.
  • Couple of things. change your

    while
    to
    if
    and you should be good to go with the irule. However, if you are on v11.5+ you can use the HTTP profile to ignore the X-Forwarded-For header from clients by configuring X-Forwarded-For header acceptance to disabled. You can then also enable X-Forwarded-For header insertion in the profile to insert that header. This will be much more efficient than the iRule.

  • Dear Brad, I've tried to change the script, but I have the same error. Do you have any other suggestions?

     

    Many Thanks. Fabrizio

     

  • Dear Brad, I've tried to change the script, but I have the same error. Do you have any other suggestions?

     

    Many Thanks. Fabrizio