LinuxSir.cn,穿越时空的Linuxsir!

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

iptables 中关于nfs的设置

[复制链接]
发表于 2011-11-8 11:45:22 | 显示全部楼层 |阅读模式
vmware+fedora7.0,通过桥接网络连接到外网



设置好nfs服务器后,关闭iptables,外面可以正常的连接上来;但是一打开iptables ,外面就连不上了,后来研究了一下iptables ,使用了如下这样的规则,还是不能打开nfs,请教是那里有问题?
iptables -I INPUT -p tcp --dport 2049 -j ACCEPT #nfs
iptables -I INPUT -p tcp --dport 111 -j ACCEPT #portmap?
iptables -I INPUT -p tcp --dport 662 -j ACCEPT #rpc?
iptables -I INPUT -p udp --dport 2049 -j ACCEPT #nfs
iptables -I INPUT -p udp --dport 111 -j ACCEPT #portmap?
iptables -I INPUT -p udp --dport 662 -j ACCEPT #rpc?



出错提示是这样的:
...
[    2.551259] Looking up port of RPC 100003/2 on 193.168.1.194
[    3.510494] PHY: 0:01 - Link is Up - 100/Full
[    3.561676] Looking up port of RPC 100005/1 on 193.168.1.194
[   33.570365] Root-NFS: Server returned error -5 while mounting /tftpboot/rootf
s
[   33.577960] VFS: Unable to mount root fs via NFS, trying floppy.



请教要设置怎样的规则才可以让外面的机器访问fedora7.0的nfs服务器?
发表于 2011-11-9 11:55:36 | 显示全部楼层
VFS: Unable to mount root fs via NFS, trying floppy.
你的NFS盘应该是NTFS格式的吧
试试用mount.cifs 挂载

/etc/init.d/iptables stop #先把iptables 关了再mount
回复 支持 反对

使用道具 举报

发表于 2011-12-27 10:56:09 | 显示全部楼层
你的防火墙设置有问题。。

还需要开更多的端口

这需要根据你的NFS配置来决定。

2楼的搞笑。。NFS关NTFS鸟事,怎么扯到NTFS上了。。
回复 支持 反对

使用道具 举报

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

本版积分规则

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