Forum Discussion
Joe_Sabek_47241
Jan 14, 2009Historic F5 Account
Passing log statement to F5 device using iControl
Is there any way to tell an F5 device to log a certain string using iControl?
The specific iControl application provides a layer of abstraction for users that do not have an account on the F5 ...
Using one VIP makes for less configuration, but it also leaves you with fewer and more complicated options if you want to manipulate the traffic. That, said, this should be pretty simple to do. If you want to add an HTTP based event to a rule, you need to use an HTTP profile on the VIP. If you have non-HTTP traffic going through the VIP, you'd want to disable the profile for it. It looks like you can determine whether it's an HTTP request or not based on the port the client makes the request to. So something like this should work:
when CLIENT_ACCEPTED {
log local0. "[IP::client_addr]:[TCP::client_port]: new TCP connection to [IP::local_addr]:[TCP::local_port]"
Check the port the client requested
switch [TCP::local_port] {
"2500" {
Client request is SSH, use SSH node
log local0. "[IP::client_addr]:[TCP::client_port]: SSH request. Using node and disabling HTTP"
node 172.16.1.33 22
Disable HTTP profile
HTTP::disable
}
"80" {
Client request is HTTP do nothing
log local0. "[IP::client_addr]:[TCP::client_port]: HTTP request"
}
default {
Client request is to an undefined port, so drop the packets
log local0. "[IP::client_addr]:[TCP::client_port]: undefined port. Dropping"
drop
}
}
}
when HTTP_REQUEST {
This event will only be triggered if the HTTP profile is enabled
and the HTTP headers are parsed
log local0. "[IP::client_addr]:[TCP::client_port]: new HTTP request to [HTTP::host][HTTP::uri]"
}
Aaron
- Colin_Walker_12Jan 25, 2006Historic F5 AccountThis is certainly something that's possible via iRules.
when HTTP_REQUEST { if { [HTTP::header exists header1] } { persist uie [HTTP::header header1] } pool http_pool }
- Ganesh_RamamoorJan 25, 2006
Nimbostratus
- Ganesh_RamamoorJan 26, 2006
Nimbostratus
- drteeth_127330Jan 26, 2006Historic F5 AccountTry adding the persist universal profile to the virtual servers and enable the "across virtuals" option.
- Ganesh_RamamoorJan 26, 2006
Nimbostratus
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects