Forum Discussion
DNS answer based on specifiv domain
Hi! I have a VS and its pool's member is a cache DNS farm. I need to get an iRule that answers a "custom" IP for a specific DNS query based on the domain name and let non matching queries pass through the actual pool. I started like this:
when DNS_REQUEST { if { [DNS::question name] ends_with "example.com.ar" }
But don't know if I gotta follow with DNS::answer and how exactly use the insert values. I can really use some help here so, thanks in advance!
1 Reply
- PeteWhite
Employee
You are very much along the right lines there. Have a go with this and see how you get on:
when DNS_REQUEST { if { [DNS::question name] ends_with "example.com.ar" } { DNS::answer clear DNS::answer insert [DNS::rr "host.domain.com" A IN 50 "1.2.3.4"] DNS::header aa 1 DNS::return } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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