Forum Discussion
Assistance requested with HTTPS Response Redirect - VMware Platform Services Controller
4) In an attempt to better understand iRules and HTTP, I have begun writing simple logging rules. Thanks to various sources on DevCentral for the bits of code that I am using and coupling together.
Here is an example of the iRule:
when CLIENT_ACCEPTED {
log local0. "Client Accepted. Client IP: [IP::client_addr]"
}
when HTTP_REQUEST {
log local0. "Request from IP [IP::local_addr] for hostname [HTTP::host] and URI [HTTP::uri]"
}
when HTTP_RESPONSE {
log local0. "Response from IP [IP::local_addr] with server IP address [IP::server_addr]. URI not valid in this context."
}
Notes: Not available in HTTP_RESPONSE:
- HTTP::host, HTTP::uri, HTTP::server
Output from the Logs: (IPs, of course, have been replaced with substitute values) Where:
- 192.168.2.2 is the Non-floating Self-IP of the F5 within the 192.168.2.x vlan.
- 192.168.2.75 is the IP of the Virtual Server hosting https://www.company.com.
- 192.168.2.91 is the IP of the "node1" back-end server that makes up one of the Members of the Pool.
- 192.168.1.51 is the IP address of the external workstation attempting to access https://www.company.com
Rule /Common/RL_InformationSeekingAndLogging : Client Accepted. Client IP: 192.168.1.51
Rule /Common/RL_InformationSeekingAndLogging : Request from IP 192.168.2.75 for hostname psc2.oma.spawar.navy.mil and URI /
Rule /Common/RL_InformationSeekingAndLogging : Request from IP 192.168.2.75 for hostname psc2.oma.spawar.navy.mil and URI /f5-w-687474703a2f2f707363322e6f6d612e7370617761722e6e6176792e6d696c$$/
Rule /Common/RL_InformationSeekingAndLogging : Response from IP 192.168.2.2 with server IP address 192.168.2.91. URI not valid in this context.
Rule /Common/RL_InformationSeekingAndLogging : Request from IP 192.168.1.75 for hostname and URI /f5-w-68747470733a2f2f69732d7073632d61766930312e6f6d612e7370617761722e6e6176792e6d696c$$/websso/
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