|
楼主 |
发表于 2006-4-21 11:32:24
|
显示全部楼层
谢谢老师!启动的问题找到了,是因为我的iptables的问题,因为我默认是drop的,但没加上本地的访问,后来我加上以下的就好了。
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
可是第一个问题还是存在,nfs文件已有了。
[root@nat script]# cat /etc/sysconfig/nfs
LOCKD_TCPPORT=2049
LOCKD_UDPPORT=2049
我从10.10.70.134上showmount -e 10.10.70.9时同时在10.10.70.134上执行tcpdump host 10.10.70.9,发现要访问别的端口,结果如下:
[root@dcbak ~]# tcpdump host 10.10.70.9
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
11:22:29.401811 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: S 1205463378:1205463378(0) win 5840 <mss 1460,sackOK,timestamp 67374765 0,nop,wscale 2>
11:22:29.402116 IP 10.10.70.9.sunrpc > 10.10.70.134.hmmp-ind: S 928463441:928463441(0) ack 1205463379 win 5792 <mss 1460,sackOK,timestamp 64966927 67374765,nop,wscale 2>
11:22:29.402134 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: . ack 1 win 1460 <nop,nop,timestamp 67374765 64966927>
11:22:29.402188 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: P 1:61(60) ack 1 win 1460 <nop,nop,timestamp 67374765 64966927>
11:22:29.402412 IP 10.10.70.9.sunrpc > 10.10.70.134.hmmp-ind: . ack 61 win 1448 <nop,nop,timestamp 64966928 67374765>
11:22:29.403195 IP 10.10.70.9.sunrpc > 10.10.70.134.hmmp-ind: P 1:33(32) ack 61 win 1448 <nop,nop,timestamp 64966928 67374765>
11:22:29.403204 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: . ack 33 win 1460 <nop,nop,timestamp 67374766 64966928>
11:22:29.403301 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: F 61:61(0) ack 33 win 1460 <nop,nop,timestamp 67374767 64966928>
11:22:29.403387 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67374767 0,nop,wscale 2>
11:22:29.403652 IP 10.10.70.9.sunrpc > 10.10.70.134.hmmp-ind: F 33:33(0) ack 62 win 1448 <nop,nop,timestamp 64966929 67374767>
11:22:29.403660 IP 10.10.70.134.hmmp-ind > 10.10.70.9.sunrpc: . ack 34 win 1460 <nop,nop,timestamp 67374767 64966929>
11:22:32.403640 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67377767 0,nop,wscale 2>
11:22:38.402439 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67383767 0,nop,wscale 2>
11:22:50.401037 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67395767 0,nop,wscale 2>
11:23:14.397244 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67419767 0,nop,wscale 2>
11:23:19.396237 arp who-has 10.10.70.9 tell 10.10.70.134
11:23:19.396377 arp reply 10.10.70.9 is-at 00:02:b3:26:a3:d7
11:24:02.389644 IP 10.10.70.134.613 > 10.10.70.9.661: S 1203289733:1203289733(0) win 5840 <mss 1460,sackOK,timestamp 67467767 0,nop,wscale 2>
11:25:38.376439 arp who-has 10.10.70.9 tell 10.10.70.134
11:25:38.376590 arp reply 10.10.70.9 is-at 00:02:b3:26:a3:d7
11:25:38.376597 IP 10.10.70.134.614 > 10.10.70.9.sunrpc: UDP, length 56
11:25:38.377462 IP 10.10.70.9.sunrpc > 10.10.70.134.614: UDP, length 28
11:25:38.377551 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:41.378954 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:43.375908 arp who-has 10.10.70.134 tell 10.10.70.9
11:25:43.375916 arp reply 10.10.70.134 is-at 00:0f:20:6d:ba:a6
11:25:44.379314 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:47.379706 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:50.380104 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:53.380505 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
11:25:56.380906 IP 10.10.70.134.615 > 10.10.70.9.658: UDP, length 96
31 packets captured
31 packets received by filter
0 packets dropped by kernel
直到:
[root@dcbak ~]# showmount -e 10.10.70.9
rpc mount export: RPC: Timed out
我在10.10.70.9上的iptables中已经开放了tcp和udp的111和2049端口。但没开放658和661端口,我发现每次重启nfs后,访问的又不是658和661这几个端口。有什么好的办法吗? |
|