as JPV mentioned, you can use RESOLV::lookup and node command.
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 14
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
set host [HTTP::host]
set dest [lindex [RESOLV::lookup @8.8.8.8 -a [HTTP::host]] 0]
if { $dest ne "" } {
node $dest
} else {
HTTP::respond 503
}
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] server [IP::remote_addr]:[TCP::release] host $host"
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Feb 23 00:37:05 ve11a info tmm[4068]: Rule /Common/myrule : client 172.28.24.1:39112 server 206.190.36.45:0 host www.yahoo.com
Feb 23 00:37:13 ve11a info tmm1[4068]: Rule /Common/myrule : client 172.28.24.1:39113 server 74.125.200.99:0 host www.google.com
Feb 23 00:37:20 ve11a info tmm[4068]: Rule /Common/myrule : client 172.28.24.1:39114 server 64.4.11.42:0 host www.microsoft.com