ftp 登录成功,但端口转发后目录列表失败

ftp 登录成功,但端口转发后目录列表失败

我正在制作一个网络服务器,我的操作系统是 Ubuntu 18.04。我的路由器是 AT&T 2WIRE i38HG

我使用 proftpd 和 gadmin-proftpd 设置了一个 FTP 服务器。当我使用计算机的 IP 地址 (192.168.1.82) 登录时,它工作正常,但在我使用 AT&T 路由器的端口转发后,新的 IP 地址公共 IP 地址。当我进入页面时ftp://公共 IP 地址,我登录了,但它只是一直在加载,什么也没有出现。

这是我的服务器设置:

Server Address: 0.0.0.0
Server Port: 21
NAT Router: 192.168.1.254
Identity lookups: Off
Reverse lookups: Off
Time standard: Local time
Passive port range: 49152 - 65534
Max connections: 30
Max login attempts: 15
Login timeout: 300
Idle timeout: 600
Transfer mode: Binary

这是 proftpd.conf 文件:

ServerType standalone
DefaultServer on
Umask 022
ServerName "0.0.0.0"
ServerIdent on "SeanServer0001"
ServerAdmin ****@gmail.com
IdentLookups off
UseReverseDNS off
Port 21
PassivePorts 49152 65534
MasqueradeAddress 192.168.1.254
TimesGMT off
MaxInstances 30
MaxLoginAttempts 15
TimeoutLogin 300
TimeoutNoTransfer 600
TimeoutIdle 600
DisplayLogin welcome.msg
DisplayChdir .message
User nobody
Group nobody
DirFakeUser off nobody
DirFakeGroup off nobody
DefaultTransferMode binary
AllowForeignAddress off
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores on
TransferRate RETR 1024
TransferRate STOR 1024
TransferRate STOU 1024
TransferRate APPE 1024
SystemLog /var/log/secure
RequireValidShell off
<IfModule mod_tls.c>
TLSEngine off
TLSRequired off
TLSVerifyClient off
TLSProtocol 
TLSLog /var/log/proftpd_tls.log
TLSRSACertificateFile /etc/gadmin-proftpd/certs/cert.pem
TLSRSACertificateKeyFile /etc/gadmin-proftpd/certs/key.pem
TLSCACertificateFile /etc/gadmin-proftpd/certs/cacert.pem
TLSRenegotiate required off
TLSOptions AllowClientRenegotiation
</IfModule>
<IfModule mod_ratio.c>
Ratios off
SaveRatios off
RatioFile "/restricted/proftpd_ratios"
RatioTempFile "/restricted/proftpd_ratios_temp"
CwdRatioMsg "Please upload first!"
FileRatioErrMsg "FileRatio limit exceeded, upload something first..."
ByteRatioErrMsg "ByteRatio limit exceeded, upload something first..."
LeechRatioMsg "Your ratio is unlimited."
</IfModule>
<Limit LOGIN>
  AllowUser test
  AllowUser seanhe
  DenyALL
</Limit>

<Anonymous /var/www/html>
User test
Group public
AnonRequirePassword on
MaxClients 10 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayChdir .msg
<Limit LOGIN>
Allow from All
Deny from all
</Limit>
AllowOverwrite off
<Limit LIST NLST  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
</Limit>
<Limit STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
</Limit>
</Anonymous>

<Anonymous /var/www/html>
User seanhe
Group admin
AnonRequirePassword on
MaxClients 15 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayChdir .msg
<Limit LOGIN>
Allow from All
Deny from all
</Limit>
AllowOverwrite on
<Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  SITE_CHMOD  SITE_CHGRP  MTDM  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
</Limit>
<Limit NOTHING >
 DenyAll
</Limit>
</Anonymous>

我转发了 FTP 端口 21 和 20

有人能告诉我哪里出了问题吗?

相关内容