The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Broke Perl Script Second pair of eyes NET::FTPSSL Styles Shell Programming and Scripting 4 01-12-2009 09:07 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-10-2009
Styles Styles is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 5
Question Net::SSLeay or Net::FTPSSL

Hello,

I ran into an issue in one of my monitoring scripts. If I use the public ip address in my connection string everything works, but if I switch the connection string ip to 127.0.0.1 or the internal ip I get, " Connection refused at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/SSLeay/Handle.pm line 229." This is most likely because it thinks it's a bad cert. I can't seem to find anything on how to force it to ignore a invalid cert? Is this even an option?

Thanks, Styles
  #2 (permalink)  
Old 02-10-2009
Styles Styles is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 5
Update: Running through debug now and now I'm really confused as to why it failing.
Quote:
DB<1>
main:health.pl:69): my $ftps = Net::FTPSSL->new($hostname, Debug => $verbose, Port => $port, Encryption => $encryption) or die "ERROR: Cannot conect to $hostname\n";
DB<1>
SKT <<< 220 .
SKT >>> AUTH TLS
SKT <<< 234 Proceed with negotiation.
main:health.pl:71): if (!$ftps->login("$username","$password")) {
DB<1>
>>> USER test
<<< 331 Please specify the password.
>>> PASS ****
<<< 230 Login successful.
main:health.pl:76): $ftps->binary;
DB<1>
>>> TYPE I
<<< 200 Switching to Binary mode.
main:health.pl:78): if (!$ftps->cwd("/$input_dir")) {
DB<1>
>>> CWD /input
<<< 250 Directory successfully changed.
main:health.pl:83): if (!$ftps->put("$input_csv_file","/$input_dir/$input_csv_file")) {
DB<1>
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode (PUBLIC IP)
connect: Connection refused at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/SSLeay/Handle.pm line 229.
at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Net/SSLeay/Handle.pm line 229
Net::SSLeay::Handle::make_socket('Net::SSLeay::Handle', PUBLIC IP, 9006) called at /usr/lib/perl5/site_perl/5.8.5/Net/FTPSSL.pm line 173
Net::FTPSSL:asv('Net::FTPSSL=GLOB(0x9f69890)') called at /usr/lib/perl5/site_perl/5.8.5/Net/FTPSSL.pm line 385
Net::FTPSSL:ut('Net::FTPSSL=GLOB(0x9f69890)', 'Test.csv', '/input/Test.csv') called at health.pl line 83
Anybody have any ideas? I'm fresh out.


Ok I think I see the problem in the debug. If I use the internal or localhost the script dies when trying to send a file via passive. We can see in the debug that the Public IP is being passed and not the internal network IP. As soon as I change the connection string to the public IP address instead of using the local internal IP everything works. So this might be a VSFTPD issue with passive transfers, or is my thinking wrong on this?

Thanks,
Eric

Last edited by Styles; 02-10-2009 at 05:45 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0