开发者社区> 问答> 正文

如何限制一个IP地址访问FTP服务器?

如何限制一个IP地址访问FTP服务器?

展开
收起
游客py5kcp7dd6tu6 2022-03-31 00:56:09 2005 0
1 条回答
写回答
取消 提交回答
  • 答:可以通过tcp_wrapper拉黑某个IP地址:首先在配置文件“/etc/vsftpd.conf”中启用参数tcp_wrapper,即“tcp_wrapper=YES”;然后将要拉黑的IP地址添加到文件“/etc/host.deny”中。 打开”/etc/hosts.deny”文件。 $ vi /etc/hosts.deny 将要拉黑的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

    2022-03-31 00:56:35
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS块储存产品全面解析 立即下载