cancel
Showing results for 
Search instead for 
Did you mean: 

iRule: How to redirect dns request for specific domain to another pool?

Vladyslaw
Nimbostratus
Nimbostratus

Hello,

 

I am looking for a way to redirect requests for specific domain to another DNS pool.

 

I tried to use this iRule, from the log I see the match but from Wireshark there is still responses from default DNS server.

when CLIENT_DATA {     if {[UDP::payload] contains "cisco"} {     log local0. "match [UDP::payload]"     pool Cloud_Flare_Pool     }   else {          log local0. "not match [UDP::payload]" } }
2 REPLIES 2

iaine
MVP
MVP

Hi

 

Have you tried moving your code into CLIENT_ACCEPTED instead of CLIENT_DATA?

 

You would have to enable Datagram LB in your UDP profile first so that traffic gets inspected on a packet by packet basis - https://support.f5.com/csp/article/K3605

Vladyslaw
Nimbostratus
Nimbostratus

Thanks for the answer,

 

The code that I wrote above worked after I cheked DNS profile in Virtual Server.