• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

vsftpd-1.1.3配制实例之三:PER_IP_CONFIG

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 21次 | 进入软件测试论坛讨论

领测软件测试网
  This example should quickly show you the possibilites of per-IP configuration
  with vsftpd's tcp_wrappers integration. This is new with v1.1.3.
  To use this, you need vsftpd built with tcp_wrappers! This is accomplished
  by editing "builddefs.h" and changing
  #undef VSF_BUILD_TCPWRAPPERS
  to
  #define VSF_BUILD_TCPWRAPPERS
  And then rebuild. If you are lucky your vendor will have shipped the vsftpd
  binary with this already done for you.
  Next, to enable tcp_wrappers integration, you need this in your vsftpd.conf:
  tcp_wrappers=YES
  And you'll need a tcp_wrappers config file. An example one is supplied in this
  directory: hosts.allow. It lives at /etc/hosts.allow.
  Let's have a look at the example:
  vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf
  vsftpd: 192.168.1.4: DENY
  The first line:
  If a client connects from 192.168.1.3, then vsftpd will apply the vsftpd
  config file /etc/vsftpd_tcp_wrap.conf to the session! These settings are
  applied ON TOP of the default vsftpd.conf.
  This is obviously very powerful. You might use this to apply different
  access restrictions for some IPs (e.g. the ability to upload).
  Or you could give certain classes of IPs the ability to skip connection
  limits (max_clients=0).
  Or you could increase / decrease the bandwidth limiter for certain classes
  of IPs.
  You get the point :-)
  The second line:
  Denies the ability of 192.168.1.4 to connect. Very useful to take care of
  troublemakers. And now you don't need x.netd to do it - hurrah.
  hosts.allow
  #
  # hosts.allow This file describes the names of the hosts which are
  # allowed to use the local INET services, as decided
  # by the '/usr/sbin/tcpd' server.
  #
  vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf
  vsftpd: 192.168.1.4: DENY
  
  

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网