Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Server response irule

MJ16othman_3008
Nimbostratus
Nimbostratus

Guyz i need an irule for server response to client request. This is the current irule i have.

when CLIENT_ACCEPTED { log local0. " This is the client ip adress [IP::remote_addr]: [TCP::remote_port] " log local0. "this is the virtual server they connected to [IP::local_addr]:[TCP::local_port]" } when SERVER_CONNECTED { log local0. "this is the virtual ip's addess [IP::local_addr]:[TCP::local_port]" log local0. "this is the server its loadbalanced to [IP::remote_addr]:[TCP::remote_port] "

}

I want to see which ip the server is responding to. How can i create an irule to see this.

2 REPLIES 2

Lee_Sutcliffe
Nacreous
Nacreous

To log the pool member (the server) responding to your client request, you can use

IP::server_addr

Please see the following wiki link for more details: https://devcentral.f5.com/Wiki/iRules.IP__server_addr.ashx

Stanislas_Piro2
Cumulonimbus
Cumulonimbus

[IP::local_addr] and [IP::remote_addr] commands return a different value on client and server side events

 

On client side events :

 

  • [IP::local_addr] returns the destination address of the client side connection (virtual server address or destination in case of forwarding virtual server)
  • [IP::remote_addr] returns the source address of the client side connection

On server side events :

 

  • [IP::local_addr] returns the source address of the server side connection (client address or snat address)
  • [IP::remote_addr] returns the destination address of the server side connection