Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
August 5, 2008 - Time to Submit Your Links for the August 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 20, 2008, 08:16:20 PM


Login with username, password and session length


Pages: [1] 2 3   Go Down
  Print  
Author Topic: FTP over TLS(explicit) + Router = PROBLEM  (Read 1299 times)
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« on: July 21, 2007, 06:21:20 PM »

I use Filezilla as the FTP client.
I want to connect to my ftp in a secure way, so lunarpages support wrote me to use the FTP over TLS(explicit) option.
It worked when the computer is connected to the internet with no router (in active mode).

BUT when the computer is connected using a router there is a problem.
When i use passive mode then it connect end EVEN show me the folders in the root directory.
But, when i try to open these folder by clicking them, i get this:

//Here the ftp client starts the connection:

Code:
Status: Connecting to abell.lunarpages.com ...
Status: Connected with abell.lunarpages.com, negotiating SSL connection...
Response: 220---------- Welcome to Pure-FTPd [TLS] ----------
Response: 220-You are user number 6 of 50 allowed.
Response: 220-Local time is now 18:08. Server port: 21.
Response: 220 You will be disconnected after 15 minutes of inactivity.
Command: AUTH TLS
Response: 234 AUTH TLS OK.
Status: SSL connection established. Waiting for welcome message...
Command: USER MY_USER
Response: 331 User MY_USER OK. Password required
Command: PASS **************
Response: 230-User MY_USER has group access to:  MY_USER
Response: 230 OK. Current restricted directory is /
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Extensions supported:
Response: EPRT
Response: IDLE
Response: MDTM
Response: SIZE
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: ESTP
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTA
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: 211 End.
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 534 Fallback to [C]
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Status: Directory listing successful
Status: Retrieving directory listing...

//Here i see all the folders in the ROOT, so here i press the WWW folder:

Code:
Command: CWD www
Response: 250 OK. Current directory is /www
Command: PWD
Response: 257 "/www" is your current location
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PASV
Response: 227 Entering Passive Mode (209,200,229,170,183,68)
Command: LIST// here it stuck for a few seconds
Error:   Transfer channel can't be opened. Reason: 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.
Error:   Could not retrieve directory listing

-----
So as you see it stucks on the LIST command and does not go in WWW.

IF i set the mode to ACTIVE this is what i get:


Code:
Status: Connecting to abell.lunarpages.com ...
Status: Connected with abell.lunarpages.com, negotiating SSL connection...
Response: 220---------- Welcome to Pure-FTPd [TLS] ----------
Response: 220-You are user number 7 of 50 allowed.
Response: 220-Local time is now 18:13. Server port: 21.
Response: 220 You will be disconnected after 15 minutes of inactivity.
Command: AUTH TLS
Response: 234 AUTH TLS OK.
Status: SSL connection established. Waiting for welcome message...
Command: USER MY_USER
Response: 331 User MY_USER OK. Password required
Command: PASS **************
Response: 230-User MY_USER has group access to:  MY_USER
Response: 230 OK. Current restricted directory is /
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Extensions supported:
Response: EPRT
Response: IDLE
Response: MDTM
Response: SIZE
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: ESTP
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTA
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: 211 End.
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 534 Fallback to [C]
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PORT 192,168,2,100,143,104
Response: 500 I won't open a connection to 192.168.2.100
                       (only to HERE_IT_WRITES_MY_REAL_IP_ADDRESS)
Error: Could not retrieve directory listing

So here as you see by the error there is a NAT problem.
Maybe i should forward some ports but which (i think tls pick random port ...)


Please help.
Thanks.
« Last Edit: July 21, 2007, 06:23:45 PM by ace22 » Logged
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #1 on: July 22, 2007, 09:49:56 PM »

Someone?
Logged
WayneSallee
is here to search for clues, question everyone and investigate the the disappearance of the
Galactic Royalty
*****
Offline Offline

Posts: 450


WWW
« Reply #2 on: July 23, 2007, 04:58:21 AM »

Why not just use your ftp software in a normal manner? It will still ask for password. Granted, it's not the most secure method, but it's probably about as secure as e-mail, not that e-mail is highly secure Smile

Maybe someone here will have more info.

Wayne Sallee
Webmaster@LeesburgNazarene.org
Logged
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #3 on: July 23, 2007, 01:27:52 PM »

"Why not just use your ftp software in a normal manner?"
If you do not use the Secure way then your password is sent to the server in plaintext.
Means, if for example you use wireless internet then everyone with a sniffer tool can trap it.

"But it's probably about as secure as e-mail, not that e-mail is highly secure"
Not true, even with the email you can set your client to use SSL.
Logged
WayneSallee
is here to search for clues, question everyone and investigate the the disappearance of the
Galactic Royalty
*****
Offline Offline

Posts: 450


WWW
« Reply #4 on: July 23, 2007, 02:52:36 PM »

Well, I decided to give it a try and see if I could get in. I downloaded the software and am seeing what I can do.

Wayne Sallee
Webmaster@LeesburgNazarene.org
Logged
WayneSallee
is here to search for clues, question everyone and investigate the the disappearance of the
Galactic Royalty
*****
Offline Offline

Posts: 450


WWW
« Reply #5 on: July 23, 2007, 02:56:53 PM »

It errored out, so I changed the settings to regular ftp and got in, so that proves that the other settings are correct,,,, hmm I'm going to keep playing with it and see what I can do.
Wayne Sallee
Webmaster@LeesburgNazarene.org
Logged
WayneSallee
is here to search for clues, question everyone and investigate the the disappearance of the
Galactic Royalty
*****
Offline Offline

Posts: 450


WWW
« Reply #6 on: July 23, 2007, 03:26:51 PM »

Well, I tryed to see if I could get it, but I keep getting the error
Quote
[18:23:49] Error:   Transfer channel can't be opened. Reason: 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.
[18:23:49] Error:   Could not retrieve directory listing

It does this when it gives the command "list".

Well I tried to see if I could figure it out for you. Smile

Wayne Sallee
Webmaster@LeesburgNazarene.org
« Last Edit: July 23, 2007, 03:36:41 PM by WayneSallee » Logged
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #7 on: July 23, 2007, 05:17:18 PM »

Hi.
Thanks.
If you want to make another step to what i have then change the Mode from passive to active:
(Press the advanced button in the screen that you set the ftp details)
Logged
Lupine1647
Berserker Poster
*****
Offline Offline

Posts: 11086


« Reply #8 on: July 23, 2007, 06:24:56 PM »

We allow FTP +Explicit TLS on our Basic and Business plans, however to get it working correctly you need to do some port forwarding at the router level. Last time I tried it out I just had to DMZ one of my machines to get it working correctly cause it wanted to use random ports.
Logged

Grr..!! Grr..!!
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #9 on: July 23, 2007, 06:42:19 PM »

Yes.
I guess you are right.
DMZ is like forwarding ALL ports.
But then, you lose the router  firewall protection, but again, it seems like the only solution here.
(unless somehow i could told it which range of port to use like 2000-2020 and then to open these ports only)
Logged
stephen.c
The A Team
Galactic Royalty
*****
Offline Offline

Posts: 351


When the going gets weird, the weird turn pro


« Reply #10 on: July 23, 2007, 07:03:30 PM »

I've been looking intothis and as soon as i get the scoop i will post it here. probably tomorrow.

stand by. Answers to follow.  Yep
Logged

ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #11 on: July 23, 2007, 07:28:07 PM »

Funny but even using DMZ did not help Smile
Same results.
Logged
stephen.c
The A Team
Galactic Royalty
*****
Offline Offline

Posts: 351


When the going gets weird, the weird turn pro


« Reply #12 on: July 23, 2007, 07:47:46 PM »

Give this a try:

Just to provide some clarification and correct any misinformation, what our servers support is FTP w/ Explicit TLS Encryption. They don't support SFTP or FTP w/ Implicit SSL/TLS Encryption.

It sounds like you have managed to get TLS encryption setup properly for your FTP session, however you are simply unable to list the directory contents. This issue is caused by the fact that you are behind a router which utilizes NAT (Network Address Translation) and you are using non-passive ftp. Please enable passive mode in your FTP client and everything should work properly for you. An overview of the options you should have selected are below:

Server: domain.com
Port: 21
Type: FTP w/ Explicit TLS Encryption
Mode: Passive
Username: username
Password: password

I have tested the following options in FileZilla and they work properly, I also had someone on a Mac test with YummyFTP and it also worked.
However please note that in YummyFTP the FTP Type is not listed as "FTP w/ Explicit TLS Encryption", instead it is labeled "Secure FTPS SSL/TLS".

If you have tried connecting via standard FTP without encryption and without passive mode enabled, and you're wondering why it worked fine in that instance but doesn't work when encryption is enabled, here's the short answer: Since you're behind a router, when in non-passive mode your FTP client will try to command the server to connect to it's LAN IP. This obviously won't work, however your router will recognize what the FTP client is attempting and will actually replace the LAN IP with the proper IP address and configure data forwarding so that the FTP connection works for you. When in an encrypted session, however, the router cannot read the FTP commands as they are not in plain text.
Therefore it cannot replace the LAN IP nor setup data forwarding and non-passive mode suddenly does not work. This is why passive mode is required, instead of the FTP client instructing the server to connect on port X of the LAN IP, it requests that the server inform it what IP address and port it can connect to. This allows the FTP client to make an outbound connection rather than trying to initiate an inbound one, which avoids all the nasty NAT issues.

Today, passive mode is actually preferred to non-passive mode as it avoids many issues that can be caused by the presence of routers and in a few other situations. Also if you were unsure, FTP w/ Explicit TLS is very secure, no login credentials or file data is sent unencrypted.Just to provide some clarification and correct any misinformation, what our servers support is FTP w/ Explicit TLS Encryption. They don't support SFTP or FTP w/ Implicit SSL/TLS Encryption.

If this doesn't work let me know.
Logged

ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #13 on: July 23, 2007, 07:55:48 PM »

Thanks but as you can see in my first post, i already use FTP w/ Explicit TLS Encryption and i also wrote the results when using the active mode AND the passive mode.
Here are the results of the passive mode again:
Here the ftp client starts the connection:

Code:
Status: Connecting to abell.lunarpages.com ...
Status: Connected with abell.lunarpages.com, negotiating SSL connection...
Response: 220---------- Welcome to Pure-FTPd [TLS] ----------
Response: 220-You are user number 6 of 50 allowed.
Response: 220-Local time is now 18:08. Server port: 21.
Response: 220 You will be disconnected after 15 minutes of inactivity.
Command: AUTH TLS
Response: 234 AUTH TLS OK.
Status: SSL connection established. Waiting for welcome message...
Command: USER MY_USER
Response: 331 User MY_USER OK. Password required
Command: PASS **************
Response: 230-User MY_USER has group access to:  MY_USER
Response: 230 OK. Current restricted directory is /
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Extensions supported:
Response: EPRT
Response: IDLE
Response: MDTM
Response: SIZE
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: ESTP
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTA
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: 211 End.
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 534 Fallback to [C]
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Status: Directory listing successful
Status: Retrieving directory listing...

//Here i see all the folders in the ROOT, so here i press the WWW folder:

Code:
Command: CWD www
Response: 250 OK. Current directory is /www
Command: PWD
Response: 257 "/www" is your current location
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PASV
Response: 227 Entering Passive Mode (209,200,229,170,183,68)
Command: LIST// here it stuck for a few seconds
Error:   Transfer channel can't be opened. Reason: 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.
Error:   Could not retrieve directory listing

-----
So as you see it stucked on the LIST command and does not go in WWW.


So, it does connect.
It does show you the root sub folders, BUT when you press the folders to get in, it stuck on the LIST command and popup a timeout message.
Can you please try to open one of the root sub folders and see if it opens it?

Thanks!
Logged
WayneSallee
is here to search for clues, question everyone and investigate the the disappearance of the
Galactic Royalty
*****
Offline Offline

Posts: 450


WWW
« Reply #14 on: July 23, 2007, 08:20:50 PM »

Yep it works.

Be sure to set both settings to passive.
the advance one, and the settings one under firewall.

Wayne Sallee
Webmaster@LeesburgNazarene.org
Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM