如何更改ProFTPd端口而不使用;“被动模式”;

如何更改ProFTPd端口而不使用;“被动模式”;,ftp,default,port,Ftp,Default,Port,我刚刚重新安装了Ubuntu服务器10.04,并决定更改所有默认端口以获得一点额外的安全性。除了我决定将FTP(ProFTPd)端口从standard 21更改为3521之外,一切都正常。防火墙或端口转发没有问题。ProFTPd已重新启动,但当我尝试连接到它时,即使它确实响应,它也会将客户端(FileZilla)置于“被动模式”,然后再也不会进入目录列表。 我真的不想使用“被动模式”,我在proftpd.conf中禁用了它,但我似乎无法改变默认端口,使其正常工作。它似乎在端口21上工作正常。仅供

我刚刚重新安装了Ubuntu服务器10.04,并决定更改所有默认端口以获得一点额外的安全性。除了我决定将FTP(ProFTPd)端口从standard 21更改为3521之外,一切都正常。防火墙或端口转发没有问题。ProFTPd已重新启动,但当我尝试连接到它时,即使它确实响应,它也会将客户端(FileZilla)置于“被动模式”,然后再也不会进入目录列表。 我真的不想使用“被动模式”,我在proftpd.conf中禁用了它,但我似乎无法改变默认端口,使其正常工作。它似乎在端口21上工作正常。仅供参考,proftpd是作为一个独立的守护程序安装的,如果这有什么关系的话?

根据定义,服务器需要从端口
L-1
启动其传出连接。您的防火墙是否也允许从端口
3520
进行传出连接

从:

3.2。建立数据连接

  The mechanics of transferring data consists of setting up the data
  connection to the appropriate ports and choosing the parameters
  for transfer.  Both the user and the server-DTPs have a default
  data port.  The user-process default data port is the same as the
  control connection port (i.e., U).  The server-process default
  data port is the port adjacent to the control connection port
  (i.e., L-1).

3.3。数据连接管理

  Default Data Connection Ports:  All FTP implementations must
  support use of the default data connection ports, and only the
  User-PI may initiate the use of non-default ports.

  Negotiating Non-Default Data Ports:   The User-PI may specify a
  non-default user side data port with the PORT command.  The
  User-PI may request the server side to identify a non-default
  server side data port with the PASV command.  Since a connection
  is defined by the pair of addresses, either of these actions is
  enough to get a different data connection, still it is permitted
  to do both commands to use new ports on both ends of the data
  connection.

您可能希望借此机会将您的用户更改为一个更好的协议。

好的,我想我在阅读本页后发现了这一点:。似乎大多数FTP连接确实是“被动”的,“主动”连接的问题来自于客户端防火墙的使用,因为FTP服务器正在一些随机端口上启动到客户端的传出“数据”连接。在被动模式下,客户端启动到服务器的“命令”和“数据”连接,因此防火墙不是问题,但您应该指定在服务器上使用哪些“被动”端口。我启用了3520和3521被动报告,它现在可以工作了

3520?不,防火墙仅用于“入站”连接,不用于“出站”。我也从来没有在端口20上启用过它,但它只在端口21启用时工作。为了以防万一,我也尝试在3520上启用它,但它仍然不起作用。好的,我想我在阅读了这个页面后发现了这个问题:。似乎大多数FTP连接确实是“被动”的,“主动”连接的问题来自于客户端防火墙的使用,因为FTP服务器正在某个随机端口上启动到客户端的传出“数据”连接。在被动模式下,客户端启动到服务器的“命令”和“数据”连接,因此防火墙不是问题,但您应该指定在服务器上使用哪些“被动”端口。我启用了3520和3521被动报告,现在working@techexpert,非常好:)我建议把你的评论移到一个答案上,这样你就可以接受它了,希望以后其他人能看到它。谢谢你的报告。:)我没有,只是接受我自己的答案似乎有点违反直觉可能:)但问题的关键是,下次有人说“在更改端口后,我无法让proftpd工作”,这里有一个类似的问题,答案值得一读。:)