If enabled, and vsftpd was compiled with tcp_wrappers support, incoming connections will be fed through tcp_wrappers access control. Furthermore, there is a mechanism for per-IP based configuration. If tcp_wrappers sets the VSFTPD_LOAD_CONF environ-ment variable, then the vsftpd session will try and load the vsftpd configuration file specified in this variable.
Default: NO
大概的意思就是如果启用tcp_wrapper这个功能,就可以实现来自不同的IP的会话加载不同的配置文件。因此也就能够满足我们的要求,配置步骤如下:
软件环境:CentOS5.7 + vsftpd2.0.5
1、编辑/etc/vsftpd/vsftpd.conf,加入: tcp_wrapper=YES
2、编辑/etc/hosts.allow,加入:
vsftpd:192.168.*.*:setenv VSFTPD_LOAD_CONF /etc/vsftpd/local.class

通过在CentOS5.7上启用vsftpd的tcp_wrappers功能,可以实现对不同IP段的FTP连接设置不同的限速策略。具体配置包括在vsftpd.conf中开启tcp_wrapper,编辑hosts.allow设置不同IP段加载的配置文件,然后创建并配置local.class和internet.class来定义限速规则。
最低0.47元/天 解锁文章
1162

被折叠的 条评论
为什么被折叠?



