Forum Discussion
Ken_Wong_48678
Sep 19, 2008Historic F5 Account
NAME::response question
I test an irule using NAME::response but never to make it works. Is there any mistakes?
I can log the hostname but there is nothing for the response. I run a tcpdump in LTM and see it send out dns requests and get responses. TIA
Regards,
Ken
when HTTP_REQUEST {
set myHostname [HTTP::host]
NAME::lookup $myHostname
log local0. "NAME: $myHostname"
}
when NAME_RESOLVED {
log local0. "NAME_RESOLVED: [NAME::response]"
}
- spark_86682Historic F5 AccountHas the HTTP connection already closed by the time the DNS response gets back to the LTM? That would certainly cause this problem. Try something like:
when HTTP_REQUEST { set myHostname [HTTP::host] NAME::lookup $myHostname log local0. "NAME: $myHostname" HTTP::collect } when NAME_RESOLVED { log local0. "NAME_RESOLVED: [NAME::response]" HTTP::release }
- Ken_Wong_48678Historic F5 AccountThanks spark, I tried but no luck....any other suggestions or does it look like a bug?
- Nicolas_Menant
Employee
Colin is right, when willing to use DNS resolution you need to do some configuration on the LTM to make it work, - Ken_Wong_48678Historic F5 Accountthanks, it works when change the named.conf to allow localhost to query.
- hoolio
Cirrostratus
I got stuck on this as well. I had to allow TMM to query named from its 127.1.1.2 address and enable recursion. As long as I was enabling recursion, I created a new view for just loopback address clients.restrict rndc access to local machines use the key in the default place: /config/rndc.key controls { inet 127.0.0.1 port 953 allow { 127.0.0.1 ;}; }; logging { channel logfile { syslog daemon; severity error; print-category yes; print-severity yes; print-time yes; }; category default { logfile; }; category config { logfile; }; category notify { logfile; }; }; options { listen-on port 53 { 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; set this to yes when you want to resolve off box. setting it to yes when you dont actuallly have a bind server configured will result in bind timeouts for many commmands recursion no; directory "/config/namedb"; allow-transfer { localhost; }; check-names master warn; change to "no" if you want to be able to add MX records that do not reference a record that has an A record check-integrity yes; }; acl "zrd-acl-000-000" { 127.10.0.0; }; acl "local-loopback-clients" { 127.0.0.0/8; }; view "internal" { match-clients { "local-loopback-clients"; }; recursion yes; }; view "external" { match-clients { "zrd-acl-000-000"; any; }; };
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