LinuxSir.cn,穿越时空的Linuxsir!

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

ypserv hostbased limit的一个问题

[复制链接]
发表于 2005-10-21 13:17:51 | 显示全部楼层 |阅读模式
my NIS server is 192.168.0.1 and NIS client is 192.168.0.2

i copyed /usr/share/doc/ypserv-xxx/securenets to Dir /var/yp
edited it as follow

# This line gives access to everybody. PLEASE ADJUST!
#0.0.0.0                0.0.0.0
255.255.255.0           192.168.0.2

my NIS client can not get any NIS info

but if i edit is as
255.255.255.0           192.168.0.0

that's OK now...

我的问题是。。看了securenets的说明 说是里面加入的是允许的主机
我的情况怎么这么怪??
This file contains netmask/network pairs.
network pairs理解为 网段的话。。。就说得通了。。不过那就没办法限制单台主机
例如192.168.0.3 这样在一个网段内的
发表于 2005-10-22 00:01:16 | 显示全部楼层
192.168.0.3不是网段,只是单机。NIS没有办法限制单个的IP。用iptables吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-22 08:20:45 | 显示全部楼层
This file contains netmask/network pairs.
果然这句话network pairs只是网段
谢谢yongjian
回复 支持 反对

使用道具 举报

发表于 2005-10-22 21:46:34 | 显示全部楼层
I had the same problem as you before, so I know exactly what's wrong.

NIS有办法限制单个的IP!!!  Read /var/yp/securenets carefully and the second paragraph says:

#               One can use the word "host" instead of a netmask of
#               255.255.255.255. Only IP addresses are allowed in this
#               file, not hostnames.
#
# Always allow access for localhost
255.0.0.0       127.0.0.0

# This line gives access to everybody. PLEASE ADJUST!
#0.0.0.0                0.0.0.0
host                    192.168.0.3
***********************************************

You see, just use the word "host" and the IP address you want to block
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-22 22:14:46 | 显示全部楼层
wow  it's so cool~~
thanks~~
i think iptables isn't a best way to set limit for a service
回复 支持 反对

使用道具 举报

发表于 2005-10-23 12:22:07 | 显示全部楼层
Post by zaiwen
I had the same problem as you before, so I know exactly what's wrong.

NIS有办法限制单个的IP!!!  Read /var/yp/securenets carefully and the second paragraph says:

#               One can use the word "host" instead of a netmask of
#               255.255.255.255. Only IP addresses are allowed in this
#               file, not hostnames.
#
# Always allow access for localhost
255.0.0.0       127.0.0.0

# This line gives access to everybody. PLEASE ADJUST!
#0.0.0.0                0.0.0.0
host                    192.168.0.3
***********************************************

You see, just use the word "host" and the IP address you want to block

Great! That's good to know.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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