Nat,
Thanks for your quick answer. I'll try to customize this irule with our custumer. Actually we resolved this with the next code
when RULE_INIT {
Header generation (in hexadecimal)
qr(1) opcode(0000) AA(1) TC(0) RD(1) RA(1) Z(000) RCODE(0000)
set ::header1 "8580"
set ::header2 "8580"
1 question, 1 answer, 0 NS, 0 Addition
set ::header1 "${::header1}0001000200000000"
set ::header2 "${::header2}0001000100000000"
Name = www.f5.com
set ::answer1 ""
set ::answer2 ""
Type = A
set ::answer1 "${::answer1}0001"
set ::answer2 "${::answer2}0001"
Class = IN
set ::answer1 "${::answer1}0001"
set ::answer2 "${::answer2}0001"
TTL = 1 day
set ::answer1 "${::answer1}00015180"
set ::answer2 "${::answer2}00015180"
Data length = 4
set ::answer1 "${::answer1}0004"
set ::answer2 "${::answer2}0004"
Address = 3.3.3.3
set ::answer1 "${::answer1}01010101"
set ::answer2 "${::answer2}02020202"
log local0. "match init"
}
when CLIENT_DATA {
binary scan [UDP::payload] H4@12A*@12H* id dname question
set dname [string tolower [getfield $dname \x00 1 ] ]
switch -glob $dname {
"\x03www\x02f5\x03com" {
set payload [binary format H* ${id}${::header1}${question}${::answer1}${::answer2} ]
drop
UDP::respond $payload
UDP::payload replace 0 0 $payload
}
default {
log local0. "does not match"
}
}
}
As soon as we test it, we´ll post our results
Thanks again
Regards
erneri