在 vsftpd 中,listen_ipv6
参数设置为 YES
后,vsftpd 将同时监听 IPv4 和 IPv6 地址。此时使用 list
等命令返回的地址应该是服务器主机名或者对应的 IP 地址。而实际监听的地址可能会有多个,包括 IPv4 和 IPv6 地址。
根据 vsftpd 的默认配置文件 /etc/vsftpd.conf
,当 listen_ipv6
设置为 YES
时,默认情况下将同时启用两个监听器:
# Enable this to listen on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both
# IPv6 and IPv4 clients. It is not necessary to listen on *both*
# IPv4 and IPv6 sockets. If you only want one or the other, then
# comment out the appropriate Listen directive below.
listen_ipv6=YES
# This directive enables listening on IPv4 sockets. By default,
# listening on the unspecified IPv4 address (0.0.0.0) will result in
# listening on all available network interfaces. If a specific
# network interface or IP address is desired, bind to that address.
listen=YES
这意味着 vsftpd 将同时监听所有可用的网络接口,并且可以接受来自IPv4和IPv6客户端的连接请求。如果您希望只监听特定的网络接口或IP地址,则需要相应地修改配置文件中的 listen_address
和 listen_ipv6_address
参数。
总之,在使用 vsftpd 时,请确保您了解您的网络环境和 vsftpd 的配置文件参数,并相应地进行调整以确保安全性和可用性。