Forum Discussion
Allow some DNS queries and block the rest
Hello,
I want and irule to just allow some DNS queries and block the rest.
I was trying with this that blocks some dns request and permit the rest
when DNS_REQUEST { switch -glob [string tolower [DNS::question name]] { "*.google.com" - "google.com" { DNS::header rcode NXDOMAIN DNS::return } } }
But I can not negate it and make it works in the other way.
Any idea how I could do this?
Thanks in advanced
- SurgeonRet. Employee
what do you mean by saying "make it works in the other way"?
- Stanislas_Piro2Cumulonimbus
In switch command, do nothing in conditions you want to allow and block in default condition
when DNS_REQUEST { switch -glob [string tolower [DNS::question name]] { "*.google.com" - "google.com" { do nothing } default { DNS::header rcode NXDOMAIN DNS::return } } }
Recent Discussions
Related Content
* 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