首页 > 其他 > 详细

tcp_wrap之实例

时间:2015-06-24 16:40:08      阅读:153      评论:0      收藏:0      [点我收藏+]

实例:
    1.允许172.16.0.0网段访问sshd
        #vim /etc/hosts.allow
            sshd: 1271.16.

        #vim /etc/hosts.deny
            sshd: ALL

    2.不允许172.16.0.0网段访问,允许172.16.100.200访问telnet,其他客户端不受控制
        #vim /etc/hosts.allow
            in.telnetd: 172.16.100.200

        #vim /etc/hosts.deny
            in.telnet: 172.16.

        或
        #vim /etc/hosts.deny
            in.telnet: 172.16. EXCEPT 172.16.100.200

        或
        #vim /etc/hosts.allow
            in.telent: ALL EXCEPT 172.16. EXCEPT 172.16.100.200

        #vim /etc/hosts.deny
            in.telnet: ALL

    3. 不允许172.16.0.0网段访问访问telnet,其他客户端不受控制
         #vim /etc/hosts.allow
            in.telnetd: 172.16. : DENY

        #vim /etc/hosts.deny
            in.telnet:  ALL

    4.允许172.16.0.0网段访问telnet,其他客户端禁止,并记录日志
         #vim /etc/hosts.allow
            in.telnetd: 172.16.  : spwan echo “Someone Entered!! `data`”  >> /var/log/tenlentlogin.log

        #vim /etc/hosts.deny
            in.telnet:  ALL

    5.进一步详细日志
         #vim /etc/hosts.allow
            in.telnetd: 172.16.  :spwan echo “`data`,Login attempt from %c to %s ,”  >> /var/log/tenlentlogin.log

        #vim /etc/hosts.deny
            in.telnet:  ALL   :spwan echo “`data`,Login attempt from %h,”  >> /var/log/tenlentlogin.log

本文出自 “小私的blog” 博客,请务必保留此出处http://ggvylf.blog.51cto.com/784661/1665031

tcp_wrap之实例

原文:http://ggvylf.blog.51cto.com/784661/1665031

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!