Forum Discussion
leozou_80567
Oct 30, 2008Historic F5 Account
use iRule to pickup http traffic form any:any VS
Hi
Our customer use virtual server 0.0.0.0:0 , they hope use iRule to pickup http traffic to a pool(many http traffic don’t use 80 port,so they can’t create 0.0.0.0:80 Vs to do it), other’s traffic will forwarding.
We want to treat all traffic as http first, So we creat VS:0.0.0.0:0 http profile, and use below iRule:
when RULE_INIT {
set ::httplog 1
}
when HTTP_REQUEST {
if { [string toupper [HTTP::uri]] eq "" } {
Proxy connect method should continue as a passthru
if {$::httplog}{log local0. " forward IP"}
HTTP::disable
forward
return
}
if {$::httplog}{log local0. " SELECT HTTP_Proxy_Pool"}
pool HTTP_Proxy_Pool
}
if the traffic is http traffic ,it is ok. But if the traffic is no http traffic,the iRule don't work.
Would anyone give some advise about this? Thanks!!!
- dennypayne
Employee
Do you ever get the log message that it should forward? I don't see anything inherently wrong with the logic, maybe I'm missing something...not sure why you need the global httplog variable though...
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