SSL connection problem

Hi,
I am having problems connecting to a web host using explicit ssl. It apears to connect fine but can't get a directory listing. I can't connect at all in implicit mode. A clear connection works without problems. Here is a log: any ideas?
Thanks : )


[12:18:52] SmartFTP v2.5.1006.10
[12:18:52] Resolving host name "[server IP address]"
[12:18:52] Connecting to [server IP address] Port: 21
[12:18:52] Connected to [server IP address].
[12:18:52] 220---------- Welcome to Pure-FTPd [TLS] ----------
[12:18:52] 220-You are user number 5 of 50 allowed.
[12:18:52] 220-Local time is now 12:18. Server port: 21.
[12:18:52] 220-This is a private system - No anonymous login
[12:18:52] 220-IPv6 connections are also welcome on this server.
[12:18:52] 220 You will be disconnected after 15 minutes of inactivity.
[12:18:52] AUTH TLS
[12:18:52] 234 AUTH TLS OK.
[12:18:52] Connected. Exchanging encryption keys...
[12:18:52] Session Cipher: 128 bit RC4
[12:18:52] TLS encrypted session established.
[12:18:52] PBSZ 0
[12:18:52] 200 PBSZ=0
[12:18:52] USER ******
[12:18:53] 331 User ****** OK. Password required
[12:18:53] PASS (hidden)
[12:18:53] 230-User ****** has group access to: ******
[12:18:53] 230 OK. Current restricted directory is /
[12:18:53] SYST
[12:18:53] 215 UNIX Type: L8
[12:18:53] Detected Server Type: UNIX
[12:18:53] FEAT
[12:18:53] 211-Extensions supported:
[12:18:53] EPRT
[12:18:53] IDLE
[12:18:53] MDTM
[12:18:53] SIZE
[12:18:53] REST STREAM
[12:18:53] MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
[12:18:53] MLSD
[12:18:53] ESTP
[12:18:53] PASV
[12:18:53] EPSV
[12:18:53] SPSV
[12:18:53] ESTA
[12:18:53] AUTH TLS
[12:18:53] PBSZ
[12:18:53] PROT
[12:18:53] 211 End.
[12:18:53] Detected Server Software: PureFTPd
[12:18:53] PWD
[12:18:53] 257 "/" is your current location
[12:18:53] TYPE A
[12:18:53] 200 TYPE is now ASCII
[12:18:53] PROT P
[12:18:53] 534 Fallback to [C]
[12:18:53] PROT C
[12:18:53] 200 OK
[12:18:53] PASV
[12:18:53] 227 Entering Passive Mode (84,234,17,142,139,37)
[12:18:53] Opening data connection to [server IP address] Port: 35621
[12:18:53] MLSD
[12:19:14] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[12:19:32] PROT P
[12:19:35] QUIT
[12:20:35] Timeout (60s).
[12:20:35] Active Help: https://www.smartftp.com/support/kb/74
[12:20:35] Client closed the connection.
[12:20:35] Resolving host name "[server IP address]"
[12:20:35] Connecting to [server IP address] Port: 21
[12:20:35] Connected to [server IP address].
[12:20:35] 220---------- Welcome to Pure-FTPd [TLS] ----------
[12:20:35] 220-You are user number 6 of 50 allowed.
[12:20:35] 220-Local time is now 12:20. Server port: 21.
[12:20:35] 220-This is a private system - No anonymous login
[12:20:35] 220-IPv6 connections are also welcome on this server.
[12:20:35] 220 You will be disconnected after 15 minutes of inactivity.
[12:20:35] AUTH TLS
[12:20:35] 234 AUTH TLS OK.
[12:20:35] Connected. Exchanging encryption keys...
[12:20:35] Session Cipher: 128 bit RC4
[12:20:35] TLS encrypted session established.
[12:20:35] PBSZ 0
[12:20:35] 200 PBSZ=0
[12:20:35] USER ******
[12:20:35] 331 User ****** OK. Password required
[12:20:35] PASS (hidden)
[12:20:36] 230-User ****** has group access to: ******
[12:20:36] 230 OK. Current restricted directory is /
[12:20:36] SYST
[12:20:36] 215 UNIX Type: L8
[12:20:36] Detected Server Type: UNIX
[12:20:36] FEAT
[12:20:36] 211-Extensions supported:
[12:20:36] EPRT
[12:20:36] IDLE
[12:20:36] MDTM
[12:20:36] SIZE
[12:20:36] REST STREAM
[12:20:36] MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
[12:20:36] MLSD
[12:20:36] ESTP
[12:20:36] PASV
[12:20:36] EPSV
[12:20:36] SPSV
[12:20:36] ESTA
[12:20:36] AUTH TLS
[12:20:36] PBSZ
[12:20:36] PROT
[12:20:36] 211 End.
[12:20:36] Detected Server Software: PureFTPd
[12:20:36] PWD
[12:20:36] 257 "/" is your current location
[12:20:49] TYPE A
[12:20:50] 200 TYPE is now ASCII
[12:20:50] PROT P
[12:20:50] 534 Fallback to [C]
[12:20:50] PROT C
[12:20:50] 200 OK
[12:20:50] PORT 192,168,0,20,6,52
[12:20:50] 500 I won't open a connection to 192.168.0.20 (only to [my public IP address])
[12:20:50] Automatic failover of data connection mode from "Active Mode (PORT)" to "Passive Mode (PASV)".
[12:20:50] PROT P
[12:20:50] 534 Fallback to [C]
[12:20:50] PROT C
[12:20:50] 200 OK
[12:20:50] PASV
[12:20:50] 227 Entering Passive Mode (84,234,17,142,139,164)
[12:20:50] Opening data connection to [server IP address] Port: 35748
[12:20:50] MLSD
[12:21:11] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[12:22:11] Timeout (60s).
[12:22:11] Active Help: https://www.smartftp.com/support/kb/74
[12:22:11] Client closed the connection.

Hello ...

The reason PORT mode doesn't work in this setup is the following:
Normally the NAT router checks your control connection for PORT commands. If it sees one it rewrites the IP address and automatically opens a port in the firewall for an incoming TCP connection. In this case as you are using a secured connection the NAT router is not able to read the communication and therefore I cannot open the port in the firewall.

The other option is PASV mode. This should work unless the FTP server doesn't allow any incoming connections. If PASV mode doesn't work with a clear connection then that's exactly the problem. If it works with a clear connection but not with a secured connection you are probably facing a similiar problem than above but on the server side.

Your other chance is CCC. This is a command to clear the control connection (hence the CCC) right after the login sequence. This will allow your NAT router to read the communication again and open the ports accordingly. Unfortunately from the log you have posted it doesn't look like pureftpd is supporting the CCC command (no CCC in the FEAT reply).

Regards,
-Mat