Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
code share

GTM Translation

Problem this snippet solves:

When GTM responds with the IP address of the virtual server, there are different NAT translations that must be performed depending on where the request is coming from. This iRule looks at 4 classes (DataGroups) to determine which (If any) of the NAT translations it must perform on the response.

This iRule differs from the pinhole example by only examining the response and the 'client' IP address. The hostname requested is ignored so there is only 1 event that needs to fire.

Note that although developed for GTM, this is an LTM iRule and is attached to the LTM VS that is created by the GTM when you configure a listener address

How to use this snippet:

These data-groups are required but MAY be empty if no translations are necessary.

  • local_address_class (type: address) - Holds a list of networks and their type (string internal or 3dp)
  • gte_translate_3dp (type: address) - Translations for 3dp networks
  • gte_translate_internet (type: address) - Translations for the internet
  • gte_translate_internal (type: address) - Translations for internal addresses
Comments on this Snippet
Comment made 3 months ago by Madni Rafik 0


When i go to use this GTM rule - i get the following error: 1070151:3: Rule [/Common/GTM_TRANSLATION_IRULE] error: Unable to find pool (hsl-log-01) referenced at line 32: [HSL::open -proto UDP -pool hsl-log-01]

I was trying to attach to LTM VS but that does not have any pool - because its just VS pushed from GTM, when you configure listener IP.

P.S. I have already configured the needed DATA GROUPS.

Appreciate your help?

Comment made 3 months ago by Jason Rahm

just to confirm, you have this iRule applied to an LTM virtual server with a dns services profile, or are you trying to use strictly a GTM iRule? They are different, and not all features work on GTM iRules like they do on LTM.

Comment made 3 months ago by Madni Rafik 0

I did try to attach on LTM VS but it does not allow to apply with the error above. For UDP - i do see UDP_GTM_DNS profile attached for TCP VS, its not.

Any suggestion to fix it? Looks like, its looking for a pool to be used?

Comment made 2 months ago by Jason Rahm

Hi Madni, the error is from this line:

set gteHSL [HSL::open -proto UDP -pool hsl-log-01]

You either need to define an HSL pool named hsl-log-01, or update this line to reflect whatever you named your nsl pool.

Comment made 2 months ago by Madni Rafik 0

Hi Jason,

Not sure, why we require HSL pool for GTM.

My requirement is that - i need clients with private IP get privat A record and public clients to get Public A record.

Comment made 1 month ago by Jason Rahm

this iRule uses HSL for logging purposes, not for traffic purposes. If you don't need that, you can trim that out of the rule.