Forum Discussion
Find connection attempts via source IP
- Apr 20, 2020
when CLIENT_ACCEPTED { set LogString "Client [IP::client_addr]" log local0. "==== $LogString (request) =====" } when SERVER_CONNECTED { log local0. "==== $LogString (server connected) - server: [LB::server addr]:[LB::server port] ====" }
I have tested that this works
You can accomplish this with an Irule on the VIP that would log the connections and output them into the ltm log.
Something like this should help with troubleshooting. But I would only use while troubleshooting not as a permanent addition:
when HTTP_REQUEST {
set LogString "Client [IP::client_addr]:[TCP::client_port] -> Requested Host[HTTP::host][HTTP::uri]"
log local0. "==== $LogString (request) ====="
}
when SERVER_CONNECTED {
log local0. "==== $LogString (server connected) - server: [LB::server addr]:[LB::server port] ===="
}
when HTTP_RESPONSE {
log local0. "==== $LogString (response) - status: [HTTP::status] ===="
}
Great thank you! One quick question because I don't want to make any assumptions, will this cause an outage of any kind? Will I need to restart anything to have he iRule work?
- BeakerApr 17, 2020Cirrus
This should no impact on actual traffic as all that is happening is the F5 is logging details of the connection. Depending on the traffic load it could lead to a lot of entries in the ltm log but that is why it is recommended for troubleshooting not permanent use.
- TFlemingApr 17, 2020Nimbostratus
Great thank you!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com