Forum Discussion

jneatherway_449's avatar
jneatherway_449
Icon for Nimbostratus rankNimbostratus
May 27, 2009

solution for GTM DNS response with NAT ?

I have a GTM/LTM setup in a network with private addressing. With a new requirement some connections will originate from the internet. Those connections will be made to a global address that is NAT'd at the internet gateway to the private address coresponding to the target LTM virtual server. The target virtual server is selected by GTM, but the problem is that GTM would dish out the internal adddress to clients on the internet.

The internet gateway is managed by a 3rd party - at this point I'm trying get them to do DNS doctoring where they do NAT, but so far they are not obliding so I would like to have other options.

I was thinking a iRule that would change DNS reponse to the NAT global address ... not having written one before this is what I came up with.

 
 when LB_SELECTED { 
 if  { [DNS::rrname] eq "www.domain.com" } { 
 if { [LB::server addr] equals "10.1.1.1" } { 
 host 200.1.1.1 
 } elseif { [LB::server addr] equals "10.1.1.2" } { 
 host 200.1.1.2 
 } 
 }   
 } 
 

The other thought was to create dummy Virtual Servers with the global IP addresses, and use those in the GTM pool. But I'm not sure if this would work with monitors.

Any way ... I'd appreciate any advice or feedback. (Including if my iRule looks feasible.)

Cheers

2 Replies

  • Hi,

     

     

    Your rule looks good, but you should just be able to use the Translation Address fields in your virtual server definitions to define both the public and the private IP's so that GTM knows to hand out the public IP.

     

     

    Denny
  • Thanks Denny

     

    I thought there would be an easier way. I'll check out that field.

     

    Thanks agian.