Forum Discussion

ott3r_308414's avatar
ott3r_308414
Icon for Nimbostratus rankNimbostratus
Aug 11, 2017

What's the priority of LTM policy and iRule?

Hi,

I am confused LTM policy will apply first or iRule.

The situation is we want to blocked all traffic comes from specific geolocation except which URI contains "mode=real".

The URL looks like this

https://our.web.site/question?user=me&mode=real&page=15&guid=8888

So I get clients geolocation by iRule and decide to reset or forward traffic

[whereis $clientip country]

And I thought LTM policy will executed first before iRule so I create policy forward all traffic which URI query parameter named mode is real to my pool

But user still got blocked when query string "mode=real"

If I put all expression in iRule then it works

if { [ string tolower [HTTP::uri]] contains "mode=real" }{
        pool my-pool
}

I found there are someone explain LTM Local Traffic Policy is executed and evaluated first, then the iRule

Which will get priority- irule or LTM policy?

Does someone have any idea about this scenario?

The software version is BIG-IP v12.1.2 (Build 0.0.249), Many thanks