Forum Discussion
Marco_Lei
Altostratus
Nov 29, 2018Create iRule condition refers to a set of data (strings)
So I'm creating an iRule on DNS Listener that, when external ip (IP not in 172.16.0.0/12) query specific domain name (such as "abctest.example.com") , stop the query and reply the DNS query by NXDoma...
Stanislas_Piro2
Cumulonimbus
Nov 29, 2018You can search in the list
when DNS_REQUEST {
set filter_list {"abctest.example.com" "deftest.test.com" "abctest.foobar.com" "abctest.barfoo.com" "exampleabc.foo.com"}
if { [lsearch -exact $filter_list [DNS::question name]] ne -1 && ![IP::addr [IP::client_addr] equals 172.16.0.0/12]} {
DNS::header rcode NXDOMAIN
DNS::return
}
}
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