AngryCat_52750
Oct 28, 2014Nimbostratus
FTP irule to resolve hostname
i have a request to build an FTP LTM VIP that will need to resolve a hostname to an IP address. i have a working example for http transaction and i need help with the ftp variables.
essentially, the server will call the VIP by an internal DNS entry, the irule was look up the end point name and resolve an IP and send it to that address.
Can someone help with the FTP portion?
when CLIENT_ACCEPTED {
set address [RESOLV::lookup @/Common/VS_DNS -a "example.company.com"]
log local0. "DNS lookup for example.company.com returned $address"
}
when HTTP_REQUEST {
set host_used [HTTP::host]
set uri_used [HTTP::uri]
set node_used [lindex $address 0]
HTTP::header replace Host "example.company.com"
log local0. "[IP::client_addr] sent request $host_used $uri_used to $node_used $uri_used"
}