TCP Wrapperes 的规则---配置hosts.deny

来源:互联网 发布:人工智能战胜人类 编辑:程序博客网 时间:2024/06/05 01:31
# hosts.deny    This file describes the names of the hosts which are
#              *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!
#当有不明来源扫描port时 ip被记录(下边的语法要有tcp wrappers的辅助,包含safe_finger这个指令!单纯的使用xinetd是无法做到下边的功能!确保安装啦 tcp_wrappers套件
)

in.telnetd: ALL : spawn (/bin/echo Security notice from host `/bin/hostname'; /
/bin/echo; /usr/sbin/safe_finger @%h ) | /

/bin/mail -s "%d -%h security" clin003@clin003 & /
:twist ( /bin/echo -e "/n/nWARNING connectin not allowed. Your attempt has been logged. ". )


in.ftpd: ALL : spawn (/bin/echo Security notice from host `/bin/hostname'; /
/bin/echo; /usr/sbin/safe_finger @%h ) | /
/bin/mail -s "%d -%h security" clin003@clin003 & /
:twist ( /bin/echo -e "/n/nWARNING connectin not allowed. Your attempt has been logged. ". )
#sshd:       ALL
sshd: ALL : spawn (/bin/echo Security notice from host `/bin/hostname'; /
/bin/echo; /usr/sbin/safe_finger @%h ) | /
/bin/mail -s "%d -%h security" clin003@clin003 & /
:twist ( /bin/echo -e "/n/nWARNING connectin not allowed. Your attempt has been logged. ". )



-----------------这个规则设定来自网络(net)-----------------------------

原创粉丝点击