限制可以获取NFS输出列表的IP和用户(目标主机showmount -e信息泄露(CVE-1999-0554))

一、漏洞描述:

NSFOCUS建议您采取以下措施以降低威胁:
* 限制可以获取NFS输出列表的IP和用户。
* 除非绝对必要,请关闭NFS服务、MOUNTD。

二、解决方案:

# 在NFS服务器上:
vim /etc/hosts.allow

mountd:192.168.1.1
rpcbind:192.168.1.1:allow

vim /etc/hosts.deny

mountd:ALL
rpcbind:ALL:deny

service sshd restart

        一个IP请求连入,linux的检查策略是先看/etc/hosts.allow中是否允许,如果允许直接放行;如果没有,则再看/etc/hosts.deny中是否禁止,如果禁止那么就禁止连入。

两个配置文件的关系为:/etc/hosts.allow 的设定优先于/etc/hosts.deny

1. 当档案 /etc/hosts.allow 存在时,则先以此档案内之设定为准;
2. 而在 /etc/hosts.allow 没有规定到的事项,将在 /etc/hosts.deny 当中继续设定!
配置习惯:

1. 允许进入的写在 /etc/hosts.allow 当中;
2. 不许进入的则写在 /etc/hosts.deny 当中。
service_name 必需 /etc/rc.d/init.d/* 里面的程序名称要相同

你可能感兴趣的:(linux)