Forum Discussion
jeffnotcarl_142
Nimbostratus
Sep 12, 2014iCall for DDNS?
I'm told that an iCall may be appropriate to get around the matter of firewall allows for sites that have multiple ip addresses presented for their namespace. For example, microsoft.com may well res...
bwolmarans_1284
Sep 20, 2014Historic F5 Account
If cnames are bugging you, here's a sample TCL script that will resolve cnames recursively, and a code snippet to show how to call it in place of dig:
---snip---
exec /config/resolvv.tcl $fqdn $dns_ip
set xx [open /config/resolvv.txt r+]
set ip_list [read $xx]
close $xx
Grab first IP only.
Roadmap feature might be to geolocate closest server from the list returned.
set ip [lindex $ip_list 0]
---snip---and here's the tcl script named resolvv.tcl. in my example, I am just saving this script to /config and making it executable.
!/usr/bin/tclsh
proc resolve_this { fqdn server {answer ""} } {
set l1 [exec dig +short @$server $fqdn a]
foreach i $l1 {
set i [string tolower $i]
set x [regexp {[a-z]} $i]
if { $x } {
resolve_this $i $server $answer
} else {
set answer "$answer\n$i"
}
}
return $answer
}
set final_answer [string trim [resolve_this [lindex $argv 0] [lindex $argv 1]]]
set x [open /config/resolvv.txt w+]
puts $x $final_answer
close $xHelp 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