Hello Guys, I have the below i-rule that I have defined and I have applied it to the virtual server. Below is the whole configuration l ( including the profile, the i-rule and the virtual server ) but for some reasons the event is not being triggered althought http traffic is reaching the virtual server on port 8080. Can anyone advise if I missed anything. thanks in advance. Your support is really appreciated.
profile http MMS_TrafficFilter_Profile {
defaults from http
}
rule MMS_TrafficFilter {
when HTTP_REQUEST {
if {[HTTP::host] contains "mmsc.omanmobile.om" } {
pool NWG_WAP2
log local0."forwarding_traffic_to_wapgw_pool"
} elseif { [HTTP::host] contains "192.168.220.8"} {
pool NWG_WAP2
log local0."forwarding_traffic_to_wapgw_pool"
} else {
reject
log local0."discarding_traffic"
}
}
}
virtual MMS_WAP2 {
destination x.x.x.x:webcache
lasthop pool lasthop_pool
ip protocol tcp
profile MMS_TrafficFilter_Profile tcp
persist NWG_WAP2_Persistence
pool NWG_WAP2
rule MMS_TrafficFilter
vlans external_mobile enable
}
MMS_TrafficFilter_Profile is the HTTP profile. If there wasn’t an HTTP profile added to the VS, you’d get an error when trying to add the iRule to the VS.
As you have an else case, something should be logged for every HTTP request to the virtual server. If you don’t see anything logged for requests, I’d guess that requests might be coming in on a VLAN which the VS isn’t enabled on. Can you try curling the VS directly from the command line of the LTM? You can use something like:
This will send an HTTP request to the VS on 1.2.3.4 port 8080 with the HTTP host header set to the IP address 192.168.220.8.
Also, when you say that requests make it to the VS, but nothing is logged, how are you determining this? Are you checking /var/log/ltm and the VS stats or a tcpdump?