I am currently having a nightmare trying to connect to a cPanel server over FTP. The client connects perfectly happily over plain FTP, but fails as soon as a data channel is opened when using SSL.
Logs from lftp with/without SSL below. I seem to get sent to a similar port range from PASV, but the MLSD (or LIST) packet never seems to get a response when sent in the encrypted session. I have tried FileZilla and lftp without success from a number of different clients on different networks, so I can't see it being a firewall issue.
Can anyone suggest where I might be going wrong, or whether there could be a config error on the host. (The only complication, as you will see, is that I do not have a certificate specifically for this hostname, so the verification fails unless I force its acceptance - could this be at fault here?)
Thanks for your help.
[email protected] ~ $ lftp -d
lftp :~> set ftp:ssl-allow no
lftp :~> open -u user,password -p 21 server.co.uk
---- Resolving host address...
---- 1 address found: xx.xx.xx.xx
lftp [email protected]:~> ls
---- Connecting to server.co.uk (xx.xx.xx.xx) port 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 8 of 50 allowed.
<--- 220-Local time is now 23:32. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported:
<--- EPRT
<--- IDLE
<--- MDTM
<--- SIZE
<--- MFMT
<--- REST STREAM
<--- MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<--- MLSD
<--- AUTH TLS
<--- PBSZ
<--- PROT
<--- ESTA
<--- PASV
<--- EPSV
<--- SPSV
<--- ESTP
<--- 211 End.
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
<--- 200 MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
---> USER user
<--- 331 User user OK. Password required
---> PASS password
<--- 230 OK. Current restricted directory is /
---> PWD
<--- 257 "/" is your current location
---> PASV
<--- 227 Entering Passive Mode (xx.xx.xx.xx,160,126)
---- Connecting data socket to (xx.xx.xx.xx) port 41086
---- Data connection established
---> LIST
<--- 150 Accepted data connection
<--- 226-Options: -a -l
<--- 226 32 matches total
---- Got EOF on data connection
---- Closing data socket
drwx--x--x 19 user user 4096 Feb 26 11:52 .
drwx--x--x 19 user user 4096 Feb 26 11:52 ..
drwx------ 2 user user 4096 Feb 12 05:54 .files
[email protected] ~ $ lftp -d
lftp :~> set ssl:verify-certificate no
lftp :~> open -u user,password -p 21 server.co.uk
---- Resolving host address...
---- 1 address found: x.x.x.x
lftp [email protected]:~> ls
---- Connecting to server.co.uk (x.x.x.x) port 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 7 of 50 allowed.
<--- 220-Local time is now 23:35. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported:
<--- EPRT
<--- IDLE
<--- MDTM
<--- SIZE
<--- MFMT
<--- REST STREAM
<--- MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<--- MLSD
<--- AUTH TLS
<--- PBSZ
<--- PROT
<--- ESTA
<--- PASV
<--- EPSV
<--- SPSV
<--- ESTP
<--- 211 End.
---> AUTH TLS
<--- 234 AUTH TLS OK.
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
Certificate: OU=Domain Control Validated,CN=*.differentserver.com
Issued by: O=AlphaSSL,CN=AlphaSSL CA - G2
Checking against: O=AlphaSSL,CN=AlphaSSL CA - G2
Trusted
Certificate: O=AlphaSSL,CN=AlphaSSL CA - G2
Issued by: C=BE,O=GlobalSign nv-sa,OU=Root CA,CN=GlobalSign Root CA
Trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘server.co.uk’
<--- 200 MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
---> USER user
<--- 331 User user OK. Password required
---> PASS password
<--- 230 OK. Current restricted directory is /
---> PWD
<--- 257 "/" is your current location
---> PBSZ 0
<--- 200 PBSZ=0
---> PROT P
<--- 200 Data protection level set to "private"
---> PASV
<--- 227 Entering Passive Mode (x,x,x,x,36,214)
---- Connecting data socket to (x.x.x.x) port 9430
**** Socket error (Connection timed out) - reconnecting
---> LIST
---> ABOR
---- Closing aborted data socket
---- Closing control socket
Logs from lftp with/without SSL below. I seem to get sent to a similar port range from PASV, but the MLSD (or LIST) packet never seems to get a response when sent in the encrypted session. I have tried FileZilla and lftp without success from a number of different clients on different networks, so I can't see it being a firewall issue.
Can anyone suggest where I might be going wrong, or whether there could be a config error on the host. (The only complication, as you will see, is that I do not have a certificate specifically for this hostname, so the verification fails unless I force its acceptance - could this be at fault here?)
Thanks for your help.
[email protected] ~ $ lftp -d
lftp :~> set ftp:ssl-allow no
lftp :~> open -u user,password -p 21 server.co.uk
---- Resolving host address...
---- 1 address found: xx.xx.xx.xx
lftp [email protected]:~> ls
---- Connecting to server.co.uk (xx.xx.xx.xx) port 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 8 of 50 allowed.
<--- 220-Local time is now 23:32. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported:
<--- EPRT
<--- IDLE
<--- MDTM
<--- SIZE
<--- MFMT
<--- REST STREAM
<--- MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<--- MLSD
<--- AUTH TLS
<--- PBSZ
<--- PROT
<--- ESTA
<--- PASV
<--- EPSV
<--- SPSV
<--- ESTP
<--- 211 End.
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
<--- 200 MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
---> USER user
<--- 331 User user OK. Password required
---> PASS password
<--- 230 OK. Current restricted directory is /
---> PWD
<--- 257 "/" is your current location
---> PASV
<--- 227 Entering Passive Mode (xx.xx.xx.xx,160,126)
---- Connecting data socket to (xx.xx.xx.xx) port 41086
---- Data connection established
---> LIST
<--- 150 Accepted data connection
<--- 226-Options: -a -l
<--- 226 32 matches total
---- Got EOF on data connection
---- Closing data socket
drwx--x--x 19 user user 4096 Feb 26 11:52 .
drwx--x--x 19 user user 4096 Feb 26 11:52 ..
drwx------ 2 user user 4096 Feb 12 05:54 .files
[email protected] ~ $ lftp -d
lftp :~> set ssl:verify-certificate no
lftp :~> open -u user,password -p 21 server.co.uk
---- Resolving host address...
---- 1 address found: x.x.x.x
lftp [email protected]:~> ls
---- Connecting to server.co.uk (x.x.x.x) port 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 7 of 50 allowed.
<--- 220-Local time is now 23:35. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220 You will be disconnected after 15 minutes of inactivity.
---> FEAT
<--- 211-Extensions supported:
<--- EPRT
<--- IDLE
<--- MDTM
<--- SIZE
<--- MFMT
<--- REST STREAM
<--- MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
<--- MLSD
<--- AUTH TLS
<--- PBSZ
<--- PROT
<--- ESTA
<--- PASV
<--- EPSV
<--- SPSV
<--- ESTP
<--- 211 End.
---> AUTH TLS
<--- 234 AUTH TLS OK.
---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
Certificate: OU=Domain Control Validated,CN=*.differentserver.com
Issued by: O=AlphaSSL,CN=AlphaSSL CA - G2
Checking against: O=AlphaSSL,CN=AlphaSSL CA - G2
Trusted
Certificate: O=AlphaSSL,CN=AlphaSSL CA - G2
Issued by: C=BE,O=GlobalSign nv-sa,OU=Root CA,CN=GlobalSign Root CA
Trusted
WARNING: Certificate verification: certificate common name doesn't match requested host name ‘server.co.uk’
<--- 200 MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
---> USER user
<--- 331 User user OK. Password required
---> PASS password
<--- 230 OK. Current restricted directory is /
---> PWD
<--- 257 "/" is your current location
---> PBSZ 0
<--- 200 PBSZ=0
---> PROT P
<--- 200 Data protection level set to "private"
---> PASV
<--- 227 Entering Passive Mode (x,x,x,x,36,214)
---- Connecting data socket to (x.x.x.x) port 9430
**** Socket error (Connection timed out) - reconnecting
---> LIST
---> ABOR
---- Closing aborted data socket
---- Closing control socket