Forum Discussion
eightsixstud_29
Sep 15, 2016Nimbostratus
Error using iRule for Conditional DNS Lookups
I am looking to perform some DNS lookups on a domain and based on the results, either provide the client with the external IP if it exists or the internal IP if there isn't an external A record. ...
- Sep 15, 2016
HI,
Can you please try below irule.
when DNS_REQUEST { if { ([IP::addr [IP::client_addr] equals 192.168.1.0/24]) and ([DNS::rrname] contains "test.com") } { set dnsName [RESOLV::lookup @8.8.8.8 -a [DNS::rrname]] if { ([DNS::rrtype] equal "A") } { DNS::return } } }
R_Marc
Sep 15, 2016Nimbostratus
Not sure how relevant this is, but for me, I had to create a local virtual to get Resolve to work consistently. Going direct actually caused all DNS to stop working on the box (TMos and Linux).
[RESOLV::lookup @/Common/dns-proxy-ipv4-dns-virtual -a $name]
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects