[wiki]EtcHostsAllowAndEtcHostsDeny

参与到Ubuntu的翻译中来
回复
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

[wiki]EtcHostsAllowAndEtcHostsDeny

#1

帖子 oneleaf » 2005-10-01 12:15

Setting up /etc/hosts.allow and /etc/hosts.deny for NFS
Procedure

*

First, disable any host's ability to talk NFS to your NFS server. I know, that sounds weird, but you'll see.

bash:~$ sudo vi /etc/hosts.deny

add this to the file:

### NFS DAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

*

Then allow only the hosts you wish to talk to your NFS server. Doing the following will allow any host with an IP that starts with 192.168.1. You can also specify specific IPs. See the manual pages hosts_access(5), hosts_options(5).

bash:~$ sudo vi /etc/hosts.allow

add this to the file:

### NFS DAEMONS
portmap: 192.168.1.
lockd: 192.168.1.
rquotad: 192.168.1.
mountd: 192.168.1.
statd: 192.168.1.


https://wiki.ubuntu.com/EtcHostsAllowAndEtcHostsDeny
当净其意如虚空,远离妄想及诸取,令心所向皆无碍
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

Re: EtcHostsAllowAndEtcHostsDeny

#2

帖子 leal » 2005-10-01 23:26

专为NFS设置/etc/hosts.allow和/etc/hosts.deny

步骤

*首先,禁止任何host(主机)能和你的NFS服务器进行NFS连接。我知道这看上去很怪异,不过稍后你就会明白。

bash:~$ sudo vi /etc/hosts.deny

把下列内容添加到文件中:

### NFS DAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

*然后,只允许那些你想要的主机和你的NFS服务器建立连接。下列步骤将允许任何IP地址以192.168.1开头的主机(连接到NFS服务器上)。你也可以指定特定的IP地址。参看man页 hosts_access(5), hosts_options(5)。

bash:~$ sudo vi /etc/hosts.allow

把下列内容添加到文件中:

### NFS DAEMONS
portmap: 192.168.1.
lockd: 192.168.1.
rquotad: 192.168.1.
mountd: 192.168.1.
statd: 192.168.1.


https://wiki.ubuntu.com/EtcHostsAllowAndEtcHostsDeny
用心×恒 | 豆瓣 | 门户 | Blog
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#3

帖子 oneleaf » 2005-10-11 12:50

头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#4

帖子 millenniumdark » 2006-07-30 1:41

此文严重过时
新的原文在这里
有时间感兴趣的可以去翻
http://wiki.ubuntu.org.cn/SettingUpNFSHowTo
回复