Forum Discussion
FTP proxy data connection
I've used this ftp proxy for ftp connection.
https://devcentral.f5.com/codeshare/ftp-proxy-v10-and-up
My iRule
when CLIENT_ACCEPTED {
TCP::respond "220 Welcome to the F5 FTP Proxy v10\r\n"
log local0. "client accepted"
TCP::collect
}
when CLIENT_DATA {
set ftplogin [TCP::payload]
log local0. "login is $ftplogin"
if { $ftplogin starts_with "USER" } {
You can set it up to use any DNS server you want.
set dnslookup "10.191.31.60"
set cuser [TCP::payload]
scan $cuser {%[^@]@%s} garbage sitename
scan $garbage %s%s cmd uid
log local0. "$sitename"
set ips [RESOLV::lookup @/OpusCapita/vs_dns_test -a $sitename]
set ips $sitename
if {$ips eq "" } {
Input wasn't an IP address, take some default action?
log local0. "$ips Input wasn't an IP address"
reject
} else {
TCP::payload replace 0 [TCP::payload length] ""
set ftp_serv "[lindex $ips 0]"
node [lindex $ips 0] [TCP::local_port]
log local0. "member adresa [lindex $ips 0] port [TCP::local_port]"
}
}
TCP::release
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
set serv_data [TCP::payload]
if { $serv_data contains "220" } {
TCP::respond "USER $uid\r\n"
log local0. "user= "USER $uid\r\n" "
TCP::payload replace 0 [TCP::payload length] ""
}
TCP::release
}
User can connect to my FP proxy VIP and connect to dest ($sitename) server. At the moment don´t use DNS. But when user try trasfer some data to FTP server. User see only timeout and no data sent. Can you please check where can be problem?
my ftp profile
Name proxy_ftp
Parent Profile ftp
ranslate Extended Enabled
Inherit Parent Profile Enabled
Data Port 0
And log from ftp server
[Cway2:/home/jtoivola/TEMP] date ; ftp 82.180.230.19 121
Fri May 20 12:31:06 EEST 2016
Connected to 82.180.230.19.
220 Welcome to the F5 FTP Proxy v10
Name (82.180.230.19:jtoivola): cwjuha1@82.180.220.75
331 Password required for cwjuha1.
Password:
230 User CWay2005Juha1 logged in.
Remote system type is UNIX.
ftp-child [32279] <05/20-12:37:47> TECH-DBG from Server-PI (3): '230 User CWay2005Juha1 logged in.'
ftp-child [32279] <05/20-12:37:47> USER-INF 'SYST' from 82.180.230.19
ftp-child [32279] <05/20-12:37:47> TECH-DBG from Server-PI (3): '215 UNIX Cway'
ftp-child [32279] <05/20-12:37:51> USER-INF 'PORT 82.180.230.19:51418' from 82.180.230.19
ftp-child [32279] <05/20-12:37:51> USER-INF 'STOR testi' from 82.180.230.19
ftp-child [32279] <05/20-12:37:51> TECH-DBG from Server-PI (3): '227 Entering Passive Mode (10,190,8,6,225,252)'
ftp-child [32279] <05/20-12:37:51> TECH-DBG got SRV-PASV 10.190.8.6:57852 for 82.180.230.19:28912
ftp-child [32279] <05/20-12:37:51> TECH-INF 'STOR testi' sent for 82.180.230.19
ftp-child [32279] <05/20-12:37:51> TECH-DBG from Server-PI (3): '150 ASCII data connection for testi (82.180.220.75,36979).'
ftp-child [32279] <05/20-12:37:55> USER-INF Transfer for 82.180.230.19 completed: STOR 'testi' read 0/4 byte/sec
ftp-child [32279] <05/20-12:37:55> TECH-DBG from Server-PI (3): '552 testi: An invalid argument value was given.'
- Chris_GrantEmployee
The 552 error code is returned by the FTP server and indicates that there was not sufficient space on the disk to upload the requested file. Note that this may be a lack of physical space, or a lack of space allocated by quota. This does not indicate a problem with your BigIP.
Recent Discussions
Related Content
* 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