Forum Discussion
mcaballe_135435
Nimbostratus
May 22, 2014iRule for cloned request and response traffic
I have a IDS that I need to send all request and response traffic to. However, to send the cloned traffic from either direction to the IDS I need to change the URI. I've created the following iRule b...
Kevin_Stewart
Employee
May 22, 2014Give this a shot:
proc send_to_sideband { data server } {
set sbserver [connect -protocol TCP -timeout 10 -idle 5 -status conn_status $server]
send -status send_status -timeout 10 $sbserver $data
}
when RULE_INIT {
set static::sideband_server "10.80.0.200:80"
}
when HTTP_REQUEST {
set req [HTTP::request]
set sb [call send_to_sideband $req $static::sideband_server]
}
I'm using a proc here. Not totally necessary, but cool nonetheless. The iRule is basically grabbing the entire HTTP request and passing it the sideband. There's no sideband receive function, so it won't listen for a response. You could alter the request data however required.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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