首页 > 系统服务 > 详细

linux中的hosts.allow和hosts.deny文件

时间:2015-06-25 01:28:59      阅读:276      评论:0      收藏:0      [点我收藏+]

linux中有iptables和tcp_wrappers防火墙,iptables防火墙原理为三个表(mangle、nat和filter)五个链(PREROUTING、INPUT、FORWORDING、OUTPUT、POSTROUTING)控制数据流量。tcp_wrapper防火墙的由hosts.allow和hosts.deny两个配置文件决定数据转发。

数据访问linux系统首先匹配hosts.allow文件,如果源IP及port能够满足.allow的条件则直接接收或转发。如果没有在hosts.allow中的匹配条目中,则系统检查hosts.deny配置文件。如果能够匹配到hosts.deny中的条目,则拒绝。

hosts.allow
#service:host(s)  [:action]
sshd:ALL:allow        :allow 可以省略

hosts.deny文件同理。


本文出自 “李义杰” 博客,请务必保留此出处http://lyjbog.blog.51cto.com/4317657/1665254

linux中的hosts.allow和hosts.deny文件

原文:http://lyjbog.blog.51cto.com/4317657/1665254

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