FTP with Explicit SSL (FTPES)¶
Contributed by: Jeremy¶
Description¶
Requirements¶
WARNING¶
iRule Source¶
when CLIENT_ACCEPTED {
SSL::disable
set CLIENT 1
}
when CLIENT_DATA {
set CLIENT 0
# determine if we need to enable TCP Collect server side
if {[string match {AUTH TLS*} [TCP::payload]]} {
serverside {TCP::collect}
} elseif {[string match {AUTH SSL*} [TCP::payload]]} {
serverside {TCP::collect}
}
TCP::release
}
when SERVER_DATA {
# TCP collect was enabled server side
# determine if the server can do FTPES
if {[string match {234*} [TCP::payload]]} {
# Server can do FTPES, enable response notify for enabling SSL
TCP::notify response
}
TCP::release
}
when SERVER_CONNECTED {
SSL::disable
if {$CLIENT} { clientside {TCP::collect} }
}
when CLIENTSSL_HANDSHAKE {
# if there is a successful handshake client side, enable SSL server side
serverside {SSL::enable}
}
when USER_RESPONSE {
# triggered when TCP::notify response is enabled
SSL::enable
}
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.