For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

eLeCtRoN's avatar
eLeCtRoN
Icon for Cirrus rankCirrus
Nov 27, 2024

F5 iRule Proxy Protocol

Hello,

 

I have this iRule:

when CLIENT_ACCEPTED

{ set proxyheader "PROXY TCP[IP::version] [IP::remote_addr] [IP::local_addr] [TCP::remote_port] [TCP::local_port]\r\n" }

when SERVER_CONNECTED {

TCP::respond $proxyheader

}

so, what I want to do now is, this iRule shout not trigger for a specific host or url, the virtual server with this assigned iRule has a LTM policy because it is one virtual server for different hosts, and the policy does the traffic send to the correct pool, so what could I do to exclude a specific URL or Host from this iRule, maybe I could get an example iRule.

 

kind regards

2 Replies

  • in the LTM policy set a variable at https request.  ie match: host is xxx, path is yyy, action: set variable SKIP_irules 1 at http_request.  else in the irule when HTTP_Request section you need to test HTTP::host and/or HTTP::path for each 

     

     

    in irule    

     if {![info exists SKIP_irules]}  {   TCP::respond $proxyheader} 

     

     

    search f5 irules HTTP::host