dennnnnis

导航

NFS 配置文件及在iptables中的配置

yum 安装nfs即可 ( yum install nfs-utils )

cat /etc/exports 

  /data/nfsdata 10.10.10.194(rw,no_root_squash)

  /data/nfsdata 10.10.10.193(rw,no_root_squash)

 

在 /etc/sysconfig/nfs 末添加已下几行

LOCKD_TCPPORT=29001 #TCP锁使用端口
LOCKD_UDPPORT=29002 #UDP锁使用端口
MOUNTD_PORT=29003 #挂载使用端口
STATD_PORT=29004 #状态使用端口

 

iptables中开放对应端口

-A INPUT -s 10.10.10.0/24 -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
-A INPUT -s 10.10.10.0/24 -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A INPUT -s 10.10.10.0/24 -m state --state NEW -m tcp -p tcp --dport 29001:29004 -j ACCEPT

 

posted on 2017-05-19 10:24  dennnnnis  阅读(187)  评论(0编辑  收藏  举报