F5 Sites
  • F5.com
  • F5 Labs
  • MyF5
  • NGINX
  • Partner Central
  • Education Services Portal (ESP)
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Skip to contentBrand Logo
Forums
CrowdSRC
Articles
GroupsEventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

Disable DNS Express to allow recursion of a delegated sub-domain

Problem this snippet solves: If you are using GTM to act both a authoritative slave with DNS Express and as a recursive cache, recursion will not work if a request is made for a delegated sub-domain...
Published May 25, 2016
Version 1.0
application delivery
BIG-IP DNS
devops
dns express
dnsx
irule
iRules
recursive dns
Brad_Parker's avatar
Brad_Parker
Icon for Cirrus rankCirrus
Joined February 19, 2020
View Profile
Patricia_Gonzal's avatar
Patricia_Gonzal
Icon for Nimbostratus rankNimbostratus
Sep 21, 2016

Ok, we got the irule working with these modifications.

when DNS_REQUEST {

  set rrr [DNS::query dnsx [DNS::question name] [DNS::question type]]

  set rname [lindex $rrr 0]
  set rtype [DNS::type [lindex $rrr 1]]

  log local0.debug "client=[IP::client_addr] name=$rname type=$rtype"

  if { $rname equals "" && $rtype equals "NS"} {

    log local0.debug "ns record detected"
    DNS::disable dnsx

  } elseif { [IP::addr [IP::client_addr] equals 192.168.0.0/24] } {

      pool /Common/ServerResolver
      log local0.debug "ServerResolver"
      return

  } else {

      pool /Common/UserResolver
      log local0.debug "UserResolver"
      return

  }


}

Help guide the future of your DevCentral Community!

What tools do you use to collaborate? (1min - anonymous)

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesTraining & Certification

SUPPORT

Manage SubscriptionsProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information