Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here is my setup,

  • 1 Windows 2008 R2 Standard Box /w G6 FTP Server installed
  • G6 is configured to use explicit SSL connections only (TCP:990)
  • 1 WatchGaurd Firebox Firewall (between server and internal network)

So, I can connect without issue and list directories on the FTPS server when I connect to the server while I am connected to the LAN (actually, RDP'd into the Win 2k8 box, you get the idea), but when I try to connect remotely to the FTPS site I cant seem to list the home directory of the user that I have configured on the server

13/05/29 20:00:48, 39, 98.208.xx.xx, , new connection from 98.208.xx.xx on 10.1.2.252:990 (Explicit SSL only)
13/05/29 20:00:48, 39, 98.208.xx.xx, , hostname resolved : c-98-208-xx-xx.hsd1.ca.comcast.net
13/05/29 20:00:48, 39, 98.208.xx.xx, , sending welcome message.
13/05/29 20:00:48, 39, 98.208.xx.xx, , 220 Gene6 FTP Server v3.10.0 (Build 2) ready...
13/05/29 20:00:48, 39, 98.208.xx.xx, , AUTH TLS
13/05/29 20:00:48, 39, 98.208.xx.xx, , 234 AUTH command ok; starting SSL connection.
13/05/29 20:00:48, 39, 98.208.xx.xx, , establishing encrypted session
13/05/29 20:00:48, 39, 98.208.xx.xx, , USER username
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 331 Password required for username.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, PASS ****
13/05/29 20:00:48, 39, 98.208.xx.xx, username, logged in as "username".
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 230 User username logged in.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, SYST
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 215 UNIX Type: L8
13/05/29 20:00:48, 39, 98.208.xx.xx, username, FEAT
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 211-Extensions supported:
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  AUTH TLS
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  CCC
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  CLNT
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  CPSV
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  EPRT
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  EPSV
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  MDTM
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  MFCT
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  MFMT
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  MLST type*;size*;create;modify*;
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  MODE Z
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  PASV
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  PBSZ
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  PROT
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  REST STREAM
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  SIZE
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  SSCN
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  TVFS
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  UTF8
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  XCRC "filename" SP EP
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  XMD5 "filename" SP EP
13/05/29 20:00:48, 39, 98.208.xx.xx, username,  XSHA1 "filename" SP EP
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 211 End.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, CLNT FileZilla
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 Noted.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, OPTS UTF8 ON
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 UTF8 OPTS ON
13/05/29 20:00:48, 39, 98.208.xx.xx, username, PBSZ 0
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 PBSZ=0
13/05/29 20:00:48, 39, 98.208.xx.xx, username, PROT P
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 PROT command successful.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, PWD
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 257 "/" is current directory.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, TYPE I
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 Type set to I.
13/05/29 20:00:48, 39, 98.208.xx.xx, username, PORT 98,208,65,76,34,82
13/05/29 20:00:48, 39, 98.208.xx.xx, username, 200 Port command successful.
13/05/29 20:00:49, 39, 98.208.xx.xx, username, MLSD
13/05/29 20:01:01, 38, 98.208.xx.xx, username, 425 Cannot open data connection.
13/05/29 20:01:01, 38, 98.208.xx.xx, username, disconnected. (00d00:00:22)
13/05/29 20:01:10, 39, 98.208.xx.xx, username, 425 Cannot open data connection.
13/05/29 20:01:10, 39, 98.208.xx.xx, username, disconnected. (00d00:00:22)

Now, I am well aware that FTP requires both a DATA (TCP/20) and SESSION (TCP/21) port to be opened, but considering I am not using port 21 - how do I determine what data port I am using considering I am using port 990 over SSL (FTPS)?

I have opened port 20, port 21 and port 990 as a test on both the internet facing firewall and the windows server firewall but I still cant get a directory listing when I connect over the internet. I have attempted to connect using both ACTV and PASV methods in Filezilla and still no dice. I remember back in the day that this sort of issue is usually due to active and passive connections, but the details are murky in my mind. And if this was all due to active or passive, why would I be able to get a directory listing when I connect from the LAN side of the network?

The permissions on the folder being shared with this user have full perms granted to everybody just to eliminate that as being the issue behind why I can get a directory listing.

So my question is - What exactly is going on here? Why can I not get a data connection via the WAN but I can via the LAN? Is this somehow due to explict SSL? Active/Passive issue?

Here is the log output from a successful local FTPS session

13/05/29 20:16:32, 40, 10.1.2.252, , new connection from 10.1.2.252 on 10.1.2.252:990 (Explicit SSL only)
13/05/29 20:16:32, 40, 10.1.2.252, , hostname resolved : IMSSERVER.alpine.local
13/05/29 20:16:32, 40, 10.1.2.252, , sending welcome message.
13/05/29 20:16:32, 40, 10.1.2.252, , 220 Gene6 FTP Server v3.10.0 (Build 2) ready...
13/05/29 20:16:32, 40, 10.1.2.252, , AUTH TLS
13/05/29 20:16:32, 40, 10.1.2.252, , 234 AUTH command ok; starting SSL connection.
13/05/29 20:16:32, 40, 10.1.2.252, , establishing encrypted session
13/05/29 20:16:32, 40, 10.1.2.252, , USER username
13/05/29 20:16:32, 40, 10.1.2.252, username, 331 Password required for username.
13/05/29 20:16:32, 40, 10.1.2.252, username, PASS ****
13/05/29 20:16:32, 40, 10.1.2.252, username, logged in as "username".
13/05/29 20:16:32, 40, 10.1.2.252, username, 230 User username logged in.
13/05/29 20:16:32, 40, 10.1.2.252, username, CLNT FileZilla
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 Noted.
13/05/29 20:16:32, 40, 10.1.2.252, username, OPTS UTF8 ON
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 UTF8 OPTS ON
13/05/29 20:16:32, 40, 10.1.2.252, username, PBSZ 0
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 PBSZ=0
13/05/29 20:16:32, 40, 10.1.2.252, username, PROT P
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 PROT command successful.
13/05/29 20:16:32, 40, 10.1.2.252, username, PWD
13/05/29 20:16:32, 40, 10.1.2.252, username, 257 "/" is current directory.
13/05/29 20:16:32, 40, 10.1.2.252, username, TYPE I
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 Type set to I.
13/05/29 20:16:32, 40, 10.1.2.252, username, PORT 10,1,2,252,220,229
13/05/29 20:16:32, 40, 10.1.2.252, username, 200 Port command successful.
13/05/29 20:16:32, 40, 10.1.2.252, username, MLSD
13/05/29 20:16:32, 40, 10.1.2.252, username, 150 Opening data connection for directory list.
13/05/29 20:16:32, 40, 10.1.2.252, username, establishing encrypted session
13/05/29 20:16:32, 40, 10.1.2.252, username, 226 Transfer ok.
share|improve this question
    
I probabally should mention that the WatchGaurd Firewall has a TON of options for FTP proxy stuff (like blocking certian FTP commands over the WAN).. By default, I have all of the ftp proxy options set to allow all commands that the fw has available in regard to FTP.. I can post screenshots if needed... not sure if thats the culprit tho. –  Richie086 May 30 '13 at 3:27
    
You say it works from the LAN, but you seem to say that you tested that by RDPing directly to the 2K8 box that hosts the FTP site, if that's the case, then that's not really a LAN test(?). –  Ƭᴇcʜιᴇ007 May 30 '13 at 4:05

1 Answer 1

up vote 1 down vote accepted

I'm pretty sure you're on the right track with it being an active/passive problem.

You almost always need to use passive when going through a NAT router or firewall.

The trick with Passive FTP and NAT/Firewalls, is that you need to specify a passive port range the FTP server can use, and then forward that port range through the firewall into the FTP server.

Set up the FTP server to use passive connections, and specify a set of about 1000 TCP ports. We use 50000-51000.

Additionally, the FTP server will/should have a place in its passive setup to specify the outside IP address (not sure about G6, but FileZilla offers an IP resolver service for dynamic IPs as well), this will also need to be provided.

You need port 990 open for FTPS, having port 21 still answer helps, as it can be used for Explicit FTP over TLS. Port 20 shouldn't be needed.

share|improve this answer
    
Yet again Techie007, you have saved the day! That was exactly the issue. I set the FTP server to use a range of PASV ports and everything is now working over the WAN. You rock! –  Richie086 May 30 '13 at 4:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.