mjdm_07 has asked for the wisdom of the Perl Monks concerning the following question:
ftp ftp.glb.xyz.net Connected to ftp.glb.xyz.net 220-Firewall ftp proxy. You must login to the proxy first. 220 Username: User (ftp.glb.xyz.net:(none)): <proxy_user> 331 Password: <proxy_pass> 230-Proxy authentication successful. Connecting to the server... 230-Firewall ftp proxy. You must login to the proxy first. 230 Please use the 'user' command to login to the FTP server. ftp> user <ftp_user>@remote-ftpsite.com 331-ftp1pdmz8 NcFTPd Server (licensed copy) ready. 331- 331 User <ftp_user> okay, need password. Password: <ftp_pass> 230-You are user #251 of 1000 simultaneous users allowed. 230 Restricted user logged in. =================== To accomplish this in Perl, we did the below: my $ftp = Net::FTP->new(‘remote-ftpsite.com’, Firewall => ftp.glb.xy +z.net', FirewallType => 7, Debug => 1 ); $ftp->authorize($proxy_user , $proxy_pass); my $ret = $ftp->login($ftp_user, $ftp_pass); ======================== But we are getting below error: Net::FTP>>> Net::FTP(2.75) Net::FTP>>> Exporter(5.57) Net::FTP>>> Net::Cmd(2.26) Net::FTP>>> IO::Socket::INET(1.27) Net::FTP>>> IO::Socket(1.28) Net::FTP>>> IO::Handle(1.23) Net::FTP=GLOB(0x2c640ffc)<<< 220-Firewall ftp proxy. You must login t +o the proxy first. Net::FTP=GLOB(0x2c640ffc)<<< 220 Username: Net::FTP=GLOB(0x2c640ffc)>>> AUTH <proxy_user> Net::FTP=GLOB(0x2c640ffc)<<< 530 Please log in with USER. Net::FTP=GLOB(0x2c640ffc)>>> user <ftp_user>@remote-ftpsite.com Net::FTP=GLOB(0x2c640ffc)<<< 331 Password: Net::FTP=GLOB(0x2c640ffc)>>> PASS .... Net::FTP=GLOB(0x2c640ffc)<<< 421 Proxy authentication failure. 19:24:03 Feed: 'BLOOMBERG' Error: Unable to connect to @remote-ftpsit +e.com ============================== It seems that it issued the User command correctly as expected: User <ftp_user>@remote_ftpsite.com (which works fine from command prom +pt) But not sure why it’s failing. Tried with the other Firewall types as +well (just in case), but no luck. Any help will be greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP through Firewall
by Anonymous Monk on Dec 28, 2012 at 02:25 UTC | |
by mjdm_07 (Initiate) on Dec 28, 2012 at 15:46 UTC |