Forum Discussion

Technological_S's avatar
Technological_S
Icon for Nimbostratus rankNimbostratus
Sep 21, 2009

inserting client ip address into DATA when protoco is not HTTP and using SNAT

Hi Devcentral.

 

 

I need insert de client IP because I using SNAT, but I don`t user HTTP protocol, I need insert de client IP into TCP DATA paquet.

 

 

Any sugestion.

 

 

Best regards

 

 

Carlos Fontecha.

2 Replies

  • Hi Carlos,

     

     

    You could potentially collect and modify the TCP payload using TCP::collect and TCP::payload. You can check the TCP wiki page for details on these commands (Click here).

     

     

    Aaron
  • Thansk Aaron.

     

     

    I create this iRule, (first aproximation).

     

     

    rule proxy-hmig

     

    {

     

    when CLIENT_ACCEPTED

     

    {

     

    set ORIG_Request [TCP::collect]

     

    set ORIG_CLIENT_IP [IP::client_addr]

     

    }

     

    when CLIENT_DATA

     

    {

     

    set ORIG_Request [string range $ORIG_Request 0 $ORIG_CLIENT_IP]

     

    TCP::release

     

    }

     

    }

     

     

     

     

    Regards

     

     

    Carlos Fontecha.