vsftpd同時支持IPv6 and IPv4


vsftpd的配置文件/etc/vsftpd.conf把中"listen=YES"和"listen_ipv6=YES"是不能同時開啟。 默認配置下"listen=YES"開啟,"listen_ipv6=YES"被注釋掉了,此時vsftpd只能監聽到IPv4的FTP請求,不能監聽到IPv6的FTP請求。怎樣讓vsftpd同時支持IPv4和IPv6哪?經過測試發現只要把'/etc/vsftpd.conf'配置文件中listen=YES"注釋掉,,"listen_ipv6=YES"開啟,保存配置文件。

 1 root@dimon-HP-dx2718-MT-KM255AV:/home# cat /etc/vsftpd.conf 
 2 # Example config file /etc/vsftpd.conf
 3 #
 4 # The default compiled in settings are fairly paranoid. This sample file
 5 # loosens things up a bit, to make the ftp daemon more usable.
 6 # Please see vsftpd.conf.5 for all compiled in defaults.
 7 #
 8 # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
 9 # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
10 # capabilities.
11 #
12 #
13 # Run standalone?  vsftpd can run either from an inetd or as a standalone
14 # daemon started from an initscript.
15 #listen=YES
16 #
17 # Run standalone with IPv6?
18 # Like the listen parameter, except vsftpd will listen on an IPv6 socket
19 # instead of an IPv4 one. This parameter and the listen parameter are mutually
20 # exclusive.
21 listen_ipv6=YES
22 #
23 # Allow anonymous FTP? (Disabled by default)
24 anonymous_enable=NO

然后重啟vsftpd service,重啟完成后vsftpd就可以同時監聽IPv4和IPv6的FTP請求了。

 1 service vsftpd restart 

 

我PC的配置是X86, Ununtu14.x, vsftpd的版本是vsfptd-2.3.5


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM