Forum Discussion
aalkhuja_160331
Cirrus
Dec 25, 2017iRule to change the DNS response IP inside the header
Hi there,
I want to create an iRule to change the address in the DNS Response header (coming from the DNS) from public IP to private.
Knowing that F5 is not the DNS itself (it is before the DNS)...
Stanislas_Piro2
Cumulonimbus
Dec 25, 2017you can try something like this:
when DNS_RESPONSE {
set rrs [DNS::answer]
DNS::answer clear
foreach rr $rrs {
if {[lindex $rr 4] equals "4.3.2.1"} {
DNS::answer insert "[lindex $rr 0] [lindex $rr 1] [lindex $rr 2] [lindex $rr 3] 1.2.3.4"
} else {
DNS::answer insert $rr
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
