Recommended Posts

Hi.

I am setting up an FTPS server using FileZilla on a Server 2008 R2 VM but I am struggling to get the directory listings up.

I have created the certificate and key password and it imports without any problem into FileZilla (client) but I get the log below

Status: Connection established, initializing TLS...

Status: Verifying certificate...

Status: TLS/SSL connection established, waiting for welcome message...

Response: 220-FileZilla Server version 0.9.41 beta

Response: 220 Welcome to The Swann Group download site.

Command: USER JasonW

Response: 331 Password required for jasonw

Command: PASS *********

Response: 230 Logged on

Command: PBSZ 0

Response: 200 PBSZ=0

Command: PROT P

Response: 200 Protection level set to P

Status: Connected

Status: Retrieving directory listing...

Command: PWD

Response: 257 "/" is current directory.

Command: TYPE I

Response: 200 Type set to I

Command: PORT 84,21,143,150,192,13

Response: 200 Port command successful

Command: MLSD

Response: 150 Opening data channel for directory list.

Response: 425 Can't open data connection.

Error: Failed to retrieve directory listing

Response: 421 Connection timed out.

Error: Connection closed by server

And from the server I get,

(000036)18/12/2012 13:36:49 - (not logged in) (
84.21.**.**
)> Connected, sending welcome message...

(000036)18/12/2012 13:36:49 - (not logged in) (
84.21.**.**
)> SSL connection established

(000036)18/12/2012 13:36:49 - (not logged in) (
84.21.**.**
)> USER JasonW

(000036)18/12/2012 13:36:49 - (not logged in) (
84.21.**.**
)> 331 Password required for jasonw

(000036)18/12/2012 13:36:49 - (not logged in) (
84.21.**.**
)> PASS *********

(000036)18/12/2012 13:36:49 - jasonw (
84.21.**.**
)> 230 Logged on

(000036)18/12/2012 13:36:49 - jasonw (
84.21.**.**
)> PBSZ 0

(000036)18/12/2012 13:36:49 - jasonw (
84.21.**.**
)> 200 PBSZ=0

(000036)18/12/2012 13:36:50 - jasonw (
84.21.**.**
)> PROT P

(000036)18/12/2012 13:36:50 - jasonw (
84.21.**.**
)> 200 Protection level set to P

(000036)18/12/2012 13:36:50 - jasonw (
84.21.**.**
)> PWD

(000036)18/12/2012 13:36:50 - jasonw (
84.21.**.**
)> 257 "/" is current directory.

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> TYPE I

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> 200 Type set to I

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> PORT 84,21,143,150,192,13

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> 200 Port command successful

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> MLSD

(000036)18/12/2012 13:36:51 - jasonw (
84.21.**.**
)> 150 Opening data channel for directory list.

(000036)18/12/2012 13:37:01 - jasonw (
84.21.**.**
)> 425 Can't open data connection.

(000036)18/12/2012 13:40:02 - jasonw (
84.21.**.**
)> 421 Connection timed out.

(000036)18/12/2012 13:40:02 - jasonw (84.21.**.**)> disconnected.

I have checked all outgoing ports are set to allow all traffic with in the set range.

Any thoughts on what I am missing?

Edited by Intrinsica
: edited at OP's request
Link to comment
https://www.neowin.net/forum/topic/1126484-setting-up-ftps-with-filezilla/
Share on other sites

So your attempting a active connection there - your telling the client to connect to

PORT 84,21,xx,xx,192,13

I snipped out part of that IP, because of privacy concerns - I would suggest you edit that. Anyway you told the server to connect to that IP on port

192*256 + 13 = 49165, since your control channel is inside a encrypted connection (ssl/tls) the helper portion of most firewalls/routers can not open the return port for you.

Also from this

jasonw (84.21.xx.xx)> disconnected

where that is the same IP as your server? Are you attempting this from a loopback forward/nat reflection, ie are you on the same network as your server -- which I would assume is behind a nat? Maybe not? That can cause grief as well. And using the public ip of your router to try and connect where your router wold have to forward/reflect the traffic back into the servers private IP?

So questions for you - is your server behind a nat and really on a private IP? And this 84.21 is your public? Where is your client? is it outside your local network?

Great info when wanting to use ftp

http://slacksite.com/other/ftp.html

This goes over the difference between active and passive connections - which you need to know what your going to be using or allowing, etc. And you need to understand if your firewall/router has helper feature to change private to pubic, and allow the return data channel traffic in the firewall states, etc.

What firewall/router is your server/clients behind - if any?

After the day I am having I can fully believe I did that too (left IP in there), unfortunately I cant edit my previous post so will ask a mod to.

84.21.*.* is the client external IP, the server IP is 194.88.*.*

The server is behind Sonicwall NSA2400`s running in a High availability set up, apparently it is one range inside and one range out, they are 2 devices running in HA mode for resilience so one is effectively in standby. They share an IP inside and out and virtual MAC address, We are going to temporarily fully open the ports tomorrow and see if that 'solves' the issue. At least then we can see if it is firewall or setup. The client is behind a Cisco ASA server.

A little back ground to the project.

We are moving data centres and ISP from our old provider (the 84.21.*.*) to a new DC (a 194.88.*.*) - both are public IP's. Currently all of our web based traffic is exiting through the old provider while I transfer the hosted server services from old to new DC. New routers are due to arrive to connect the 2 new connections for our new ISP, one is web based traffic only with failover to the DC, other is MPLS dedicated connection to hosted servers.

Currently I am testing the access to the web/ftp server from outside the PWAN which is where I am getting this problem.

So,

The server is behind the Sonicwalls with a public IP of 194.88.*.*, private IP is 192.168.200.*. The client is on a separate PWAN using the public IP of 84.21.*.*, private IP is 192.168.11.*.

I am going to take a look at that article tonight and see what I am missing.

So on the client end your helper is not going to be able to see what port your client is listening on for the server to connect back to you because its inside a ssl/tls tunnel

This is the issue with ftps!!

So you could try a passive connection - but then your going to have issues with opening the ports on the server side because again the helper can not see what ports are going to be used.

Take a look at this article

http://wiki.filezill...k_Configuration

You should be able to setup the server side to use specific ports for the active connections - and then forward those on your firewall, etc. Another question for you are you going to be dong Implicit or Explicit. Since you called it ftps and not ftpes I would have think your using Implicit?

You know what is a MUCH EASIER solution -- use SFTP, there is only 1 port involved (22) because its over SSH. You can change that port if you want - but its still only 1 port!! No active/passive **** with split control and data channels. Much easier to work through nat and firewalls with ;)

Think I am gonna stick with FTPS (for now), prefer to fix this and learn a little and if I still cant get it going, will switch to SFTP.

So I have set FileZilla to use a specific port range and have requested the people who manage the server side NAT to fully open these ports to test the connection. Next I need to connect forcing passive mode so it is the client that establishes the data connection. So from that I now get this log from the client.

Status: Connection established, initializing TLS

Status: Verifying certificate

Status: TLS/SSL connection established, waiting for welcome message...

Response: 220-FileZilla Server version 0.9.41 beta

Response: 220 Welcome to The Swann Group download site.

Command: USER JasonW

Response: 331 Password required for jasonw[Command: PASS *********

Response: 230 Logged on

Command: PBSZ 0

Response: 200 PBSZ=0

Command: PROT P

Response: 200 Protection level set to P

Status: Connected

Status: Retrieving directory listing...

Command: PWD

Response: 257 "/" is current directory

Command: TYPE I

Response: 200 Type set to I

Command: PASV

Response: 227 Entering Passive Mode (217,161,**.**,58,153)

Command: MLSD

Error: GnuTLS error -53: Error in the push function

Response: 425 Can't open data connection

Error: Failed to retrieve directory listing

Response: 421 Connection timed out

Error: Connection closed by server

The IP address is completely wrong, not sure where that came from so I am looking into that but it is using the correct port.

Yeah that 217.161 is the IP the server is telling the client to connect too. It should be the same IP you connected too for the control channel connection.

that port would be 58x256 + 153 so 15001

Look in your server settings on where its getting IP from.. Could be going out a different connection your coming into it from? You can set that IP in the same place you set the ports to use for passive.

Well that makes no sense then. Other than if it thinks its local connection? You could try unchecking that and see what IP gets sent back. Clearly your hard coding the IP which is different than what your seeing.

Is it possible your connecting to a different ftp server? Did you try restarting the ftp server once you made that setting?

VICTORY!!

After a reboot and clearing the check box,

Response: 220-FileZilla Server version 0.9.41 beta

Response: 220 Welcome to The Swann Group download site.

Command: USER JasonW

Response: 331 Password required for jasonw

Command: PASS *********

Response: 230 Logged on

Command: PBSZ 0

Response: 200 PBSZ=0

Command: PROT P

Response: 200 Protection level set to P

Status: Connected

Status: Retrieving directory listing...

Command: PWD

Response: 257 "/" is current directory.

Status: Directory listing successful

Not sure if it was the reboot or clearing the check box but as all traffic to and from the FTP server will be from a public address then the box can stay cleared.

Thanks Budman, your help is very much appreciated!.

Glad you got it working, shouldn't have to worry about the checkbox if you don't have local users connecting, etc. But may need it if you do?? Prob put it back and connect from local machine, etc.

Although we are connected via an MPLS PWAN all ftp traffic is routed through a second connection so it should always be a public IP, but definitely worth noting though.

I even got to learn something new about active and passive connections which after the telephone conversation I just had with the managers and owners is quite a feat! Apparently a data centre migration is a simple task and should only take a couple of days.........

Understanding the difference between an active or passive ftp connection is 1st step in wanting to run a ftp server, or even connect to one when NAT is involved or firewalls even if everyone is on same network or fully public connections, etc.

These days most every client is going to be behind a nat - this will change as ipv6 takes hold. So you will run into issues all the time with either active or passive connections. Most firewalls and even home routers have helper features for ftp to allow the data side of the connection - but as you learned with ftps this all changes because the helper can not view the info to either change the IP sent to public vs private and or open the firewall for the connection by working out the ports given in the pasv or port command.

This thread should be a good reference for others looking to do the same thing as well.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Lethal fake phone chargers are still being sold on Amazon and eBay, UK watchdog warns by Paul Hill Credit: Pexels The UK consumer rights organization, Which?, is claiming that “potentially lethal knock-off chargers” are still being sold on online marketplaces seven years after it exposed the danger of these chargers. In its latest investigation, it bought 15 USB phone chargers from several online marketplaces and found they were missing key information, meaning they cannot be legally sold in the UK. Which? bought the 15 chargers from seven online marketplaces. These were Amazon (including Amazon Haul), AliExpress, B&Q Marketplace, Debenhams Marketplace, and eBay. It said that the chargers were so badly made that anyone using them was at risk of electric shock. Over half the chargers also posed fire and explosion risks. Of the chargers purchased, one was a fake Apple USB-C 35W power adaptor charger. To confuse buyers, the box was branded with an Apple logo, but testing found it to be a fake. Further testing picked up arcing sounds after 10 seconds of use, where a current jumps between two parts of the electrical circuit, which can cause fires, explosions, or electric shock. The manufacturers of this particular charger also put modeling clay inside it to make it feel more weighty, robust, and genuine. Not all of the chargers were technically faulty; however, some were missing key packaging, markings, and documentation, meaning they can’t be sold in the UK legally. Which? said that it is now campaigning alongside a coalition of safety groups and businesses for new laws that make online marketplaces responsible for ensuring the safety of products that they choose to list on their websites. It also said the government needs to start using powers under the Product Regulation and Metrology Act, which was adopted last July, to impose safety requirements on online marketplaces via secondary legislation, but so far, there have been delays. No matter what country you are in, be sure to properly research what you are buying and only buy authentic chargers to prevent fires. You can read more about Which?’s research here.
    • Visual Studio finally gets long-awaited feature that developers will love by Usama Jawad Visual Studio Code is Microsoft's popular, lightweight, open-source code editor, it is actually Visual Studio that is the company's flagship integrated development environment (IDE). Although the IDE already offers a boatload of useful features for developers, Microsoft has finally introduced a long-requested capability that will be loved by many. While developers have already been able to create Git pull requests (PRs) directly within Visual Studio for the past couple of years, it had not been possible to review a PR without switching to the browser, until now. Microsoft revealed in December 2025 that it is working on UX that enables developers to do just that, and fast-forward to June 2026, and Visual Studio finally has native capabilities to open and inspect a PR, discuss feedback, and wrap up the review, all without switching to the browser. This integration works for both GitHub and Azure DevOps (including on-prem). Developers have access to multiple surfaces to open a PR, including Git Repository, Git Changes, and the Git menu in Visual Studio. Once you open a PR, all the important details will be immediately visible to you, from where you can navigate to various levels of granularity and branch states, depending on the reviews that you are engaged in. As you would expect, you also get a diff view that enables you to see code changes inline or side-by-side in a separate panel. You can also review commit-by-commit. Additionally, this UX fosters collaboration as you can leave comments, reply to threads, and resolve conversations easily. Naturally, you can also leverage Copilot to apply a code suggestion to fix a potential issue. When you are done, you have the ability to approve, complete, and merge the PR. This is a pretty major feature as it has been requested heavily for the past few years. You can try it out in Visual Studio 2026 version 18.7, made available here recently. Microsoft plans to enhance this experience further in future releases with comment filtering, a timeline of PR activity, and more.
    • This AdGuard Family lifetime deal is still only $15.97 by Steven Parker Today's highlighted Neowin Deal comes via our Apps + Software section, where you can get a lifetime subscription and save 90% on a lifetime AdGuard Family Plan. AdGuard is a unique program that has all the necessary features for what they claim to be "the best web experience." The software combines the an advanced ad blocker, a privacy protection module, and a parental control tool—all working in one app. This software deals with annoying ads, hides your data from a multitude of trackers, protects you from malware attacks, and even lets you restrict your kids from accessing inappropriate content. Install AdGuard and see the internet as it was supposed to be: clean and safe. Get rid of annoying banners, pop-ups & video ads once and for all Hide your data from the multitude of trackers & activity analyzers that swarm the web Avoid fraudulent and phishing website and malware attacks Protect your kids online by restricting them from accessing inappropriate & adult content Good to know Family Plan Length of access: lifetime This plan is only available to new users Redemption deadline: redeem your code within 30 days of purchase Max number of devices: 9 Access options: desktop & mobile Software version: AdGuard Family Updates included A lifetime subscription of AdGuard Family Plan normally costs $169.99, but this deal can be yours for just $15.97, that's a saving of $157.02. For full terms, specifications, and license info please click the link below. Get this AdGuard Family lifetime deal for just $15.97 (was $169.99) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. As an online publication, Neowin too relies on ads for operating costs and, if you use an ad blocker, we'd appreciate being whitelisted. In addition, we have an ad-free subscription for $28 a year, which is another way to show support! Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • the MCT currently downloads 26200.8653, so not completely up to date.
  • Recent Achievements

    • Week One Done
      Timaximus earned a badge
      Week One Done
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
    • Week One Done
      davidbazooked earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      PsYcHoKiLLa
      175
    3. 3
      +Edouard
      160
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!