Forum Discussion
Paulius
MVP
bindummawat I found some odd formating such as spaces around variables and events which I have adjusted. Try this iRule and see if you receive the same or another error. If you do receive an error please post it here.
when DNS_REQUEST {
if { [DNS::edns0 exists] } {
# log local0. [DNS::edns0 subnet address]"
set ecs_address [DNS::edns0 subnet address]
if { ${ecs_address} == "172.31.177.0" } {
log local0. "Received EDNS request from [IP::client_addr]:${ecs_address}"
host 172.30.112.9
} else {
log local0. "Received EDNS request from [IP::client_addr]:${ecs_address}"
host 172.30.112.8
}
}
}
bindummawat
Sep 28, 2023Altostratus
The same works under GSLB-iRules but did not work Delivery-iRules.
But I found another solution using node <ip> <port> and that worked for my requirement.
Thanks