网站搜索

10 个高级 VsFTP 面试问题与解答 - 第二部分


我们对上一篇文章收到的回复感到不知所措。我们提出了关于非常安全的文件传输协议10个精彩问题。继续VSFTP面试文章,我们在这里向您介绍另一个10个高级面试问题,这肯定会对您有所帮助。

  1. 10 个基本 Vsftp 面试问题/答案 – 第一部分

请注意 vsftpd.conf 文件用于控制本文中指定的配置的各个方面。默认情况下,vsftpd 会在 /etc/vsftpd/vsftpd.conf 下搜索配置文件。然而,文件的格式非常简单,并且包含注释或指令。以“#”开头的注释行将被忽略,指令行具有以下格式。

option=value

在我们开始问题和他们解释清楚的答案之前,我们想回答一个问题“谁将参加 FTP 面试? ”。好吧,没有人。也许没有人会参加 FTP 面试。但我们提出主题明智的问题是为了保持系统化的方法,这样在任何面试中,您都不会收到关于我们在此介绍的任何主题/主题的新问题。

11. 如何阻止在您的内部专用 VSFTP 网络上进行恶意行为的 IP?
使用 host.deny 文件阻止 IP

打开“/etc/hosts.deny”文件。

vi /etc/hosts.deny

在文件底部添加以下行,其中包含要阻止访问 FTP 的 IP 地址。

#
hosts.deny    This file contains access rules which are used to
              deny connections to network services that either use
              the tcp_wrappers library or that have been
              started through a tcp_wrappers-enabled xinetd.
#
              The rules in this file can also be set up in
              /etc/hosts.allow with a 'deny' option instead.
#
              See 'man 5 hosts_options' and 'man 5 hosts_access'
              for information on rule syntax.
              See 'man tcpd' for information on tcp_wrappers
#
vsftpd:172.16.16.1
使用 iptables 规则阻止 IP

要阻止对特定 IP 地址的 FTP 访问,请将以下丢弃规则添加到 iptables INPUT 链中。

iptables -A RH-Firewall-1-INPUT -p tcp -s 172.16.16.1 -m state --state NEW -m tcp --dport 21 -j DROP
12. 如何允许匿名用户进行安全 SSL 连接?你会怎么做?
Add this line to enable secured SSL connection to anonymous users.
allow_anon_ssl=YES
13. 如何允许匿名用户创建新目录并写入该目录?
Uncomment this to enable any form of FTP write command.
write_enable=YES
Uncomment this if you want the anonymous FTP user to be able to create
new directories.
anon_mkdir_write_enable=YES
14. 如何启用匿名下载,但禁用写入权限?
Add this line to enable read only permission to anonymous users.
allow_anon_ssl=YES
15. 如何自动 CHMOD 所有匿名上传。你会怎么做?
Add this line to chmod all anonymous uploads automatically.
chmod_enable=YES
16. 如何禁用 FTP 服务器中的目录列表?
Add this line to disable directory listing.
dirlist_enable=NO
17、如何维护VSFTP登录的会话。你会怎么做?
Add this line to maintain session logins.
session_support=YES
18. 列出目录内容时如何显示本地时区时间?
Add this line to display directory listing in local time zone.
usr_localtime=YES
19. 如何限制 VSFTP 服务器的最大传输速率?
Add this line to limit the ftp transfer rate.
anon_max_rate=0 # 0 means unlimited
20. 如何让VSFTP的空闲会话超时?
Add this line to set the ftp timeout session.
idle_session_timeout=300

目前为止就这样了。我们将很快推出下一篇文章,在此之前请继续关注并保持联系,不要忘记在评论部分向我们提供您宝贵的反馈。