UPDATE - Summary of what resolved it: After fixing a mis-typed port on the router, I got the error "450 TLS session of data connection has not resumed or the session does not match the control connection" - which led me to unticking the server setting "Require TLS session resumption on data connection when using PROT P" which fixed the problem. Not sure what disabling this "feature" means for security. ------
Original Post - My goal is to get Explicit FTP over TLS working with Firezilla server. I've set up Firezilla and the Windows Firewall to let in the same range of ports.
Firewall Ports: 21, 50000-51000
Firezilla Server: Passive Ports: 50000-51000
My router also has this range of ports forwarded on TCP to the correct LAN IP.
My server is behind a NAT and has a static IP which is also listed on the passive settings tab of Firezilla Server. The only way I've had any success is when the client is on the same side of the NAT and only when straight up plain FTP and only in active mode.
I tested with ftptest.net and this is the log
Explicit FTP over TLS
Status: Resolving address of xxx.x.xxx.xxx
Status: Connecting to xxx.x.xxx.xxx
Warning: The entered address does not resolve to an IPv6 address.
Status: Connected, waiting for welcome message...
Reply: 220-FileZilla Server 0.9.60 beta
Reply: 220 Welcome
Command: CLNT https://ftptest.net on behalf of xxx.x.xxx.xxx
Reply: 200 Don't care
Command: AUTH TLS
Reply: 234 Using authentication type TLS
Status: Performing TLS handshake...
Status: TLS handshake successful, verifying certificate...
Status: Received 1 certificates from server.
Status: cert[0]: subject='CN=xxx.x.xxx.xxx,C=US,ST=My state,L=My city' issuer='CN=xxx.x.xxx.xxx,C=US,ST=My state,L=My city'
Command: USER username
Reply: 331 Password required for username
Command: PASS *************
Reply: 230 Logged on
Command: SYST
Reply: 215 UNIX emulated by FileZilla
Command: FEAT
Reply: 211-Features:
Reply: MDTM
Reply: REST STREAM
Reply: SIZE
Reply: MLST type*;size*;modify*;
Reply: MLSD
Reply: AUTH SSL
Reply: AUTH TLS
Reply: PROT
Reply: PBSZ
Reply: UTF8
Reply: CLNT
Reply: MFMT
Reply: EPSV
Reply: EPRT
Reply: 211 End
Command: PBSZ 0
Reply: 200 PBSZ=0
Command: PROT P
Reply: 200 Protection level set to P
Command: PWD
Reply: 257 "/" is current directory.
Status: Current path is /
Command: TYPE I
Reply: 200 Type set to I
Command: PASV
Reply: 227 Entering Passive Mode (xxx,x,xxx,xxx,196,44)
Command: MLSD
Reply: 425 Can't open data connection for transfer of "/"
Error: Listing failed
Allow fallback to plain FTP
Warning: Allowing fallback to plaintext FTP is insecure. You should use explicit FTP over TLS.
Status: Resolving address of xxx.x.xxx.xxx
Status: Connecting to xxx.x.xxx.xxx
Warning: The entered address does not resolve to an IPv6 address.
Status: Connected, waiting for welcome message...
Reply: 220-FileZilla Server 0.9.60 beta
Reply: 220 Welcome
Command: CLNT https://ftptest.net on behalf of xxx.x.xxx.xxx
Reply: 200 Don't care
Command: AUTH TLS
Reply: 234 Using authentication type TLS
Status: Performing TLS handshake...
Status: TLS handshake successful, verifying certificate...
Status: Received 1 certificates from server.
Status: cert[0]: subject='CN=xxx.x.xxx.xxx,C=US,ST=My state,L=My city' issuer='CN=xxx.x.xxx.xxx,C=US,ST=My state,L=My city'
Command: USER username
Reply: 331 Password required for username
Command: PASS *************
Reply: 230 Logged on
Command: SYST
Reply: 215 UNIX emulated by FileZilla
Command: FEAT
Reply: 211-Features:
Reply: MDTM
Reply: REST STREAM
Reply: SIZE
Reply: MLST type*;size*;modify*;
Reply: MLSD
Reply: AUTH SSL
Reply: AUTH TLS
Reply: PROT
Reply: PBSZ
Reply: UTF8
Reply: CLNT
Reply: MFMT
Reply: EPSV
Reply: EPRT
Reply: 211 End
Command: PBSZ 0
Reply: 200 PBSZ=0
Command: PROT P
Reply: 200 Protection level set to P
Command: PWD
Reply: 257 "/" is current directory.
Status: Current path is /
Command: TYPE I
Reply: 200 Type set to I
Command: PASV
Reply: 227 Entering Passive Mode (xxx,x,xxx,xxx,196,107)
Command: MLSD
Reply: 425 Can't open data connection for transfer of "/"
Error: Listing failed
I'd appreciate any help in getting past this. Thanks in advance.