Net::SSLeay or Net::FTPSSL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Net::SSLeay or Net::FTPSSL
# 1  
Old 02-10-2009
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  
Old 02-10-2009
Update: Running through debug now and now I'm really confused as to why it failing.
Quote:
DB<1>
main:Smiliehealth.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:Smiliehealth.pl:71): if (!$ftps->login("$username","$password")) {
DB<1>
>>> USER test
<<< 331 Please specify the password.
>>> PASS ****
<<< 230 Login successful.
main:Smiliehealth.pl:76): $ftps->binary;
DB<1>
>>> TYPE I
<<< 200 Switching to Binary mode.
main:Smiliehealth.pl:78): if (!$ftps->cwd("/$input_dir")) {
DB<1>
>>> CWD /input
<<< 250 Directory successfully changed.
main:Smiliehealth.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:Smilieasv('Net::FTPSSL=GLOB(0x9f69890)') called at /usr/lib/perl5/site_perl/5.8.5/Net/FTPSSL.pm line 385
Net::FTPSSL:Smilieut('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..
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. HP-UX

Net-snmp 5.7.2 on HP-UX 11.31

Hi All, I have an issue with net-snmp communication from a monitoring server to HP UX server. Following are the details HP - UX server : 172.16.184.34 Monitoring Server : 172.16.5.57 (Solarwinds Application)I'm running HP-UX's snmp on udp port 161 and net-snmp on udp 1161. ... (0 Replies)
Discussion started by: maverick_here
0 Replies

2. Shell Programming and Scripting

Perl: errors during "install Net::SSLeay"

Hi, Here is the errors: Any help will be greatly appreciated! (4 Replies)
Discussion started by: aixlover
4 Replies

3. Shell Programming and Scripting

net help with getopts

Hi I have written the following script. But the variable sid is not getting set why is that. When i run the script i get the output as ORATAB FOR is Instead if i run the script like test.sh xiamin i am expecting the output as ORATAB FOR xiamin is #!/bin/ksh while... (4 Replies)
Discussion started by: xiamin
4 Replies

4. Shell Programming and Scripting

Broke Perl Script Second pair of eyes NET::FTPSSL

Hi all, Let me first start out by saying I'm a perl newbie and hope somebody can help, for the life of me I can't figure out why my script will not find and download a remote file via FTPSSL. What it's supposed to do is find the latest file named... (4 Replies)
Discussion started by: Styles
4 Replies

5. Programming

regarding net

how we can find whether net is connected or diconnected. (10 Replies)
Discussion started by: phani_sree
10 Replies

6. Solaris

Getting on the net

I've been having trouble getting my old gateway computer on the net with solaris. All of the network stuff is built into the motherboard. Is there a way that I can get it recognized? (4 Replies)
Discussion started by: possuman72
4 Replies
Login or Register to Ask a Question