Forum Discussion

ichalis_37981's avatar
ichalis_37981
Historic F5 Account
Oct 23, 2012

Catch date BEFORE it is sent to the server but after server TCP connection is opened

Hi,

 

I'm looking to do the following:

 

In USER_REQUEST event, i identify the TCP connection (SRC PORT+DEST IP) and combine this with information gathered in the CLIENT_DATA event to make a decision whether to send the packet to the server or not.

 

This methodology works to the point where i can at least identify the condition, but by then it is too late as the USER_REQUEST event fires AFTER the data is sent to the server.

 

I cant use the CLIENT_DATA event on its own, because at that stage the server-side connection information is not yet available.

 

Has anyone succeeded in modifiying or preventing data to be sent to the server once the TCP connection is initiated, but before the data is sent?

 

 

2 Replies

  • does TCP::respond in SERVER_CONNECTED event not usable?

     

     

    this is an example by Richard.

     

     

    TCP Data Payload split CodeShare

     

    https://devcentral.f5.com/wiki/iRules.TCP-Data-Payload-split.ashx
  • this is another example. TCP::collect is initially called in LB_SELECTED which will trigger CLIENT_DATA.

     

     

    Oracle RAC Connection String Rewrite by Jason

     

    https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1090575/Oracle-RAC-Connection-String-Rewrite.aspx