ubuntu proftpd[5291]:警告:无法确定 IP 地址

ubuntu proftpd[5291]: warning: unable to determine IP address of

我的 proftpd 有问题,我收到以下消息: 你有解决这个问题的想法吗? 更新 ubuntu

后问题开始
2016-04-05 14:26:40,722 mydomain_mydomain.no-ip.biz proftpd[5376]: warning: unable to determine IP address of 'mydomain_mydomain.no-ip.biz'
2016-04-05 14:26:40,722 mydomain_mydomain.no-ip.biz proftpd[5376]: error: no valid servers configured
2016-04-05 14:26:40,722 mydomain_mydomain.no-ip.biz proftpd[5376]: fatal: error processing configuration file '/etc/proftpd/proftpd.conf'

这个合成器很奇怪:mydomain_mydomain.no-ip.biz

ifconfig

enp2s0    Link encap:Ethernet  HWaddr 00:e0:4c:68:31:b2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)

enp3s0    Link encap:Ethernet  HWaddr 00:e0:4c:68:31:b3  
          inet adr:192.168.0.101  Bcast:192.168.0.255  Masque:255.255.255.0
          adr inet6: fe80::2e0:4cff:fe68:31b3/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:65868 erreurs:0 :0 overruns:0 frame:0
          TX packets:51527 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:46464848 (46.4 MB) Octets transmis:6390833 (6.3 MB)

lo        Link encap:Boucle locale  
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          Packets reçus:5307 erreurs:0 :0 overruns:0 frame:0
          TX packets:5307 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1 
          Octets reçus:557770 (557.7 KB) Octets transmis:557770 (557.7 KB)

vi /etc/hostname
computername
mydomain.no-ip.biz



 vi /etc/hosts
       127.0.0.1       localhost
        127.0.1.1       computername
        127.0.0.1       mydomain.no-ip.biz
        192.168.0.137   mydomain.no-ip.biz


        ::1     ip6-localhost ip6-loopback
        fe00::0 ip6-localnet
        ff00::0 ip6-mcastprefix
        ff02::1 ip6-allnodes
        ff02::2 ip6-allrouters

        #fe80::2e0:4cff:fe68:31b3 mydomain.no-ip.biz

我的 proftpd 配置

ServerType standalone
DefaultServer on
Umask 022
ServerName "0.0.0.0"
ServerIdent on "My FTP Server"
ServerAdmin email@example.org
IdentLookups off
UseReverseDNS off
Port 21
PassivePorts 49152 65534
#MasqueradeAddress None
TimesGMT off
MaxInstances 30
MaxLoginAttempts 3
TimeoutLogin 300
TimeoutNoTransfer 120
TimeoutIdle 120
DisplayLogin welcome.msg
DisplayChdir .message
User nobody
Group nobody
DirFakeUser off nobody
DirFakeGroup off nobody
DefaultTransferMode binary
AllowForeignAddress off
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
TransferRate RETR 220
TransferRate STOR 250
TransferRate STOU 250
TransferRate APPE 250
SystemLog /var/log/secure
RequireValidShell off
<IfModule mod_tls.c>
TLSEngine off
TLSRequired off
TLSVerifyClient off
TLSProtocol SSLv23
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 local_test
  DenyALL
</Limit>

<Anonymous /var/www>
User local_test
Group www-data
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 on
<Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE_CHMOD  MTDM  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
</Limit>
<Limit SITE  SITE_CHGRP >
 DenyAll
</Limit>
</Anonymous>

默认情况下,ProFTPD 假设您的服务器的 DNS 名称是返回的:

$ hostname

因此它会尝试通过 DNS 将该名称解析为 IP 地址。 (从技术上讲,ProFTPD 内部使用 gethostname(2) 系统调用, 通常 使用 /etc/hostname。)如果 DNS 解析失败,ProFTPD 无法启动,因为它认为任何其他 FTP 客户端都无法访问您的服务器。

您可以通过在 proftpd.conf:

中使用 DefaultAddress 指令来解决这个问题
DefaultAddress mydomain.no-ip.biz

希望对您有所帮助!