免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 11102 | 回复: 13
打印 上一主题 下一主题

[FTP] 求NFS的端口配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-04 15:36 |只看该作者 |倒序浏览
我配置的NFS,没加防火墙能用,加了防火墙就不行了呀,有位好心人能把你配置的IPTABLES的NFS给我共享下呀,

论坛徽章:
0
2 [报告]
发表于 2008-05-04 19:17 |只看该作者
新建文件: /etc/sysconfig/nfs                  也可以通过图形化的服务器配置文件来实现这一步
MOUNTD_PORT="4002"
STATD_PORT="4003"
LOCKD_TCPPORT="4004"
LOCKD_UDPPORT="4004"

iptables -A INPUT 2 -p tcp --dport 111 -j ACCEPT
iptables -A INPUT 2 -p udp --dport 111 -j ACCEPT
iptables -A INPUT 2 -p tcp --dport 2049 -j ACCEPT
iptables -A INPUT 2 -p udp --dport 2049 -j ACCEPT
iptables -A INPUT 2 -p tcp --dport 4002:4004 -j ACCEPT
iptables -A INPUT 2 -p udp --dport 4002:4004 -j ACCEPT

[ 本帖最后由 世界因我而精彩 于 2008-5-4 19:18 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-05-04 21:55 |只看该作者
我每次做服务全都是把防火墙关了的啊,这样做不好么?

论坛徽章:
0
4 [报告]
发表于 2008-05-05 14:13 |只看该作者

回复 #3 xialinux 的帖子

不行呀,

可是在客户端显示挂职载超时呀

论坛徽章:
0
5 [报告]
发表于 2008-05-05 14:52 |只看该作者

请做过NFS高人帮下忙呀

NFS服务器192.168.0.2  客户机192.168.0.3.
在192.168.0.NFS服务器上,/etc/services  最后加上给rquotad  tcp    4005
/etc/sysconfig/nfs 里面是MOUNTD_PORT=4002
STATD_PORT=4003
LOCKD_TCPPORT=4004
LOCKD_UDPPORT=4004
我也在IPTABLES里面配置如下,开了4002,4003,4004,4005,111,2049这些端口,可以在
192.168.0.3上面mount -t nfs   192.168.0.2:/steven  /steven/ 显示超时呀,

我想在NFS服务器和客户端都都配置IPTABLEA呀,有那位高人帮我配置下呀,十分感谢呀!!!!!!!!!!!!!

论坛徽章:
0
6 [报告]
发表于 2008-05-05 15:18 |只看该作者

怎么没人帮我搞定配置呀

那么高手,给小弟一份关于NFS服务器和客户端的详细IPTABLES 的配置清单呀

论坛徽章:
0
7 [报告]
发表于 2008-05-05 15:26 |只看该作者
先使用 rpcinfo -p localhost 確認本機這台 nfs server 到底目前是在用哪些 port 在運作吧。\r

--

论坛徽章:
0
8 [报告]
发表于 2008-05-05 17:06 |只看该作者
先用service iptables stop关掉防火墙,如果挂载没有问题就可以肯定是防火墙问题.
如果确定是防火墙的问题,就iptables -L帖上来看看.

论坛徽章:
0
9 [报告]
发表于 2008-05-07 14:08 |只看该作者

大家帮下忙呀

[root@localhost steven]# rpcinfo -p
   程序 版本 协议   端口
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    391002    2   tcp  32771  sgi_fam
    100011    1   udp    614  rquotad
    100011    2   udp    614  rquotad
    100011    1   tcp    617  rquotad
    100011    2   tcp    617  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100021    1   udp  32770  nlockmgr
    100021    3   udp  32770  nlockmgr
    100021    4   udp  32770  nlockmgr
    100021    1   tcp  32772  nlockmgr
    100021    3   tcp  32772  nlockmgr
    100021    4   tcp  32772  nlockmgr
    100005    1   udp    632  mountd
    100005    1   tcp    635  mountd
    100005    2   udp    632  mountd
    100005    2   tcp    635  mountd
    100005    3   udp    632  mountd
    100005    3   tcp    635  mountd
    100024    1   udp  32771  status
    100024    1   tcp  32792  status

[root@localhost steven]# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:ftp-data
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:22222
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:webcache
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:mysql
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:cvspserver
ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:http
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:nfs
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:sunrpc
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:617
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:635
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:32772
ACCEPT     tcp  --  localhost.localdomain  anywhere           tcp dpt:32768
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     icmp --  anywhere             anywhere           limit: avg 1/sec burst 5
ACCEPT     tcp  --  anywhere             anywhere           state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:ftp-data
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:ftp
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:22222
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:webcache
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:mysql
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:cvspserver
ACCEPT     tcp  --  anywhere             anywhere           tcp spt:http
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:nfs
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:sunrpc
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:617
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:635
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:32772
ACCEPT     tcp  --  anywhere             localhost.localdomaintcp spt:32768
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     icmp --  anywhere             anywhere           limit: avg 1/sec burst 5
ACCEPT     tcp  --  anywhere             anywhere           state RELATED,ESTABLISHED

论坛徽章:
0
10 [报告]
发表于 2008-05-07 14:12 |只看该作者

大家帮我分析下,当到是那里出错了呀,

上面的是客户端的信息呀,


下面的是服务器的呀
[root@localhost ~]# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp   4003  status
    100024    1   tcp   4003  status
    100011    1   udp   4005  rquotad
    100011    2   udp   4005  rquotad
    100011    1   tcp   4005  rquotad
    100011    2   tcp   4005  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp   4004  nlockmgr
    100021    3   udp   4004  nlockmgr
    100021    4   udp   4004  nlockmgr
    100021    1   tcp   4004  nlockmgr
    100021    3   tcp   4004  nlockmgr
    100021    4   tcp   4004  nlockmgr
    100005    1   udp   4002  mountd
    100005    1   tcp   4002  mountd
    100005    2   udp   4002  mountd
    100005    2   tcp   4002  mountd
    100005    3   udp   4002  mountd
    100005    3   tcp   4002  mountd

我IPTABLES上面这些端都开了呀
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP