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

I got it to work, but need to add additional functionality.

Is it possible to add additional conditions to forward queries based on client ip to a specific dns pool after we have performed the recursive query for NS records of our DNS Express Zones?

I can split this Irule into two parts (DNS Express Recursive Query Fix) and (Route based on source IP) independently. When I combine the irules it breaks. I have a feeling it has to do with the order in which the F5 processes the traffic. (CLIENT_ACCEPT before DNS_REQUEST)

`when DNS_REQUEST {
    query DNS Express to look for a sub-domain delegation
    set rrr [DNS::query dnsx [DNS::question name] [DNS::question type]]
    evaluate if the queried zone is defined in DNS Express
    empty response indicates DNS Express does not have the requested domain
    check if DNS Express response is a delegated sub-domain referral
    if { [lindex $rrr 0] equals "" && [DNS::type [lindex [lindex $rrr 1] 0]] equals "NS"} {
    log local0.debug "ns record detected"
        no ANSWER was returned AND AUTHORITY is an NS record(not a SOA)
        this is a referral so we should disble DNS Express to allow for the subdomain to be recursed
        DNS::disable dnsx
        log local0.debug "Subdomain"
    } 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