Forum Discussion
assaf_benedic_1
Nimbostratus
Aug 31, 2006Identify HTTP requests in TCP traffic
Is it possible to redirect HTTP traffic that is not sent on port 80?
I other words, can I create an iRule that will analyze all TCP traffic and will redirect only traffic that has HTTP synt...
dennypayne
Employee
Aug 31, 2006If you don't create a virtual for those ports LTM will reject the traffic (unless you have a port 0 virtual which is often not ideal).
You could use something similar to this (from the example in the wiki on TCP::payload) on a port 0 virtual though:
when CLIENT_ACCEPTED {
TCP::collect 15
}
when CLIENT_DATA {
if { [TCP::payload 15] contains "XYZ" } {
pool xyz_servers
} else {
pool web_servers
}
}
where "XYZ" would be some sort of identifier for HTTP syntax and the xyz_servers pool was a redirect page.
BUT, since HTTP::redirect can't be called from CLIENT_DATA and TCP::payload can't be called from HTTP_REQUEST I'm not sure how to cohesively merge the 2 functions...
Denny
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