Forum Discussion

Adidasn2019_247's avatar
Adidasn2019_247
Icon for Nimbostratus rankNimbostratus
Sep 19, 2017

DNS Lookup Internet

Hi Guys,

this is my irule, for resolving the dns, with this irule at current i have to add the pool member (in which the dns resolves to), however i do not want to do that.

I would like the f5 to resolve the dns, whenever the VS gets hit.

what do i need to tweak in order to get this working? Many thanks

Log debug messages to /var/log/ltm? 1=yes, 0=no.

when HTTP_REQUEST { set host_debug 1 Use Google's DNS Server set dnslookup "8.8.8.8" Resolve URL set ips [RESOLV::lookup @$dnslookup -a “xxxxxx”]

    if {$ips eq ""}{
    log local0. "No valid IP resolved"
    reject
     Unable to resolve IP reject request

    }
else {
     Select the IP 
if {$host_debug}{log local0. "IP resolved! - [lindex $ips 0]"}
    node [lindex $ips 0] 443
}

}