LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1913|回复: 6

host.allow, host.deny的作用?

[复制链接]
发表于 2003-12-21 21:09:59 | 显示全部楼层 |阅读模式
启动服务有两种方法,xinetd和standalone,
/etc/host.alllow /etc/host.deny两个文件对xinetd是有效的吧?
他们对standalone方式有效吗?为什么?

两位如果他们有冲突,那个优先?
发表于 2003-12-22 08:50:39 | 显示全部楼层
对standalone的程序是没效的哦
因为standalone的不由xinetd管理
不会有冲突的:)
 楼主| 发表于 2003-12-22 09:47:17 | 显示全部楼层
不好意思,表达不清
我是说如果一个host,在hsot。allow中允许,同时在host。deny禁止,到底那个有效。

还有这辆个文件的格式如何?
 楼主| 发表于 2003-12-22 10:20:11 | 显示全部楼层
发表于 2003-12-22 21:15:43 | 显示全部楼层
我一般不用xinetd来控制服务的-_-
没经验……
不过我相信应该有相关文档……
其实你试一试不就知道了吗?
发表于 2003-12-22 22:23:52 | 显示全部楼层
最初由 antelope 发表
不好意思,表达不清
我是说如果一个host,在hsot。allow中允许,同时在host。deny禁止,到底那个有效。

还有这辆个文件的格式如何?

一般是allow的优先级高。
如果你在deny里面设置ALL:ALL
在allow里面还是可以打开特定的服务的
发表于 2003-12-23 06:30:22 | 显示全部楼层
hosts.allow and hosts.deny belongs tcpwrapper package (man hosts_config for details).

tcpwrapper first check rules in hosts.allow from top to bottom. If one rule is satisfied, then access is granted.

If all rules in hosts.allow are not satisfied, then tcpwrapper check the rules in hosts.deny from top the bottom. If one rule is satisfied, then access is denied.

If all rules in hosts.deny are not satisfied, then access is granted.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表