Forum Discussion

Sam_Parkes_1110's avatar
Sam_Parkes_1110
Icon for Nimbostratus rankNimbostratus
Oct 10, 2011

Problem with whereis using a variable for IP address on v10.2.2 LTM?

I'm working on an iRule to get a user redirected to a mobile site, based on their Geolocation. I've got the mobile redirects working perfectly using a class (see bottom of this post) , but as I cannot get 'whereis' working using the [IP::client_addr] value I've gone back to just trying to get a log line working:

 

 

This rule does not work:

 

when CLIENT_ACCEPTED { log local0. "Got client: [whereis [IP::client_addr] country]" }

 

 

Log extract: Oct 9 19:59:38 local/tmm info tmm[26206]: Rule my_rule : Got client:

 

 

This rule work perfectly:

 

when CLIENT_ACCEPTED { log local0. "Got client: [whereis 213.212.78.27 country]" }

 

 

Log extract: Oct 9 20:01:01 local/tmm info tmm[26206]: Rule my_rule : Got client: GB EU {Greater London} {} {}

 

 

I've tried so may things, and am going a bit crazy now so asking you guys if you know what this is. I'm on F5 LTM v10.2.2, both 1500s and 6800 models - neither work. The frustrating thing is I've used [IP::client_addr] many times before with block rules or other log lines for example, just never in conjunction with "whereis". Anyone got a clue whats going on here??

1 Reply

  • Hi Sam,

     

     

    I replied to your post here:

     

    http://devcentral.f5.com/Forums/tabid/53/aft/2154748/Default.aspx

     

     

    Aaron