ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【Linux】/etc/hosts.deny与/etc/hosts.allow

【Linux】/etc/hosts.deny与/etc/hosts.allow

原创 Linux操作系统 作者:小亮520cl 时间:2016-06-28 15:33:23 0 删除 编辑
[root@app toolsqldir]# more /etc/hosts.deny 
#
# 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
#
sshd: ALL                 ----禁止所有登陆
[root@app toolsqldir]# more /etc/hosts.allow 
#
# hosts.allow   This file contains access rules which are used to
#               allow or deny connections to network services that
#               either use the tcp_wrappers library or that have been
#               started through a tcp_wrappers-enabled xinetd.
#
#               See 'man 5 hosts_options' and 'man 5 hosts_access'
#               for information on rule syntax.
#               See 'man tcpd' for information on tcp_wrappers
#
sshd: 125.208.12.124 60.12.157.77 182.254.152.182   放开这些ip   也可以是ip段!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29096438/viewspace-2121126/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
毕业以后专业任职数据库工程师职位,itpub一直作为自己的笔记记录的地方,blog写的不详细,草书笔记,仅供参考!

注册时间:2013-09-12

  • 博文量
    529
  • 访问量
    1126926