Forum Discussion

Nick_T_68319's avatar
Nick_T_68319
Icon for Nimbostratus rankNimbostratus
Nov 25, 2009

redirect to a different vs based on topology?

I have GTM's and LTM's in my environment. I received a requested today to redirect a site based off the user's IP address.

 

 

Here is the example:

 

 

www.mywebsite.com

 

and

 

www.mywebsite.co.uk

 

 

If a user from the UK hit's the .com site, they are redirected to the UK site, and vica versa. I don't think the topology feature will work in the GTM, since that is for the whole GTM, not on an individual wide ip basis.

6 Replies

  • Hi Nick,

     

     

    At a DNS level, I think you could use the whereis command (Click here) in GTM to check the client/LDNS IP address and answer with the the .co.uk IP for UK clients and the .com IP address for non-UK clients.

     

     

    It might be more ideal to also do this check at the VIP level and send an HTTP redirect to UK clients who request the .com VIP and redirect non-UK clients who request the .co.uk VIP. I believe the whereis command will be available in LTM iRules in the upcoming 10.1.0 release.

     

     

    Aaron
  • Yeah I was thinking that as well. At the LTM/VIP level, I don't think it has a topology database though, so I would have to put together a list of subnet's that are from the UK right?
  • In 10.1, you can use the whereis command in LTM. But for now, you could load the GeoIP info for the UK to a datagroup and then reference it for the LTM iRule.

     

     

    There is a very useful post on this here:

     

     

    Message Reject based on source IP (GeoIP)

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=21847

     

     

    Aaron
  • I've heard 10.1 should be released any day now, but until then I don't think the docs are available. I tested the whereis command in a 10.1 beta version after getting confirmation from F5 that it should work:

     

     

    Using GTM GeoIP database from an LTM iRule?

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=63035

     

     

    Note: I wouldn't suggest using 10.1 in production until a subrelease or two have been released.

     

     

    Aaron