亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標題: 求教 nfs服務器防火墻問題 [打印本頁]

作者: shocking119    時間: 2016-04-29 17:16
標題: 求教 nfs服務器防火墻問題
nfs服務器192.168.137.11開放防火墻:
客戶機運行#showmount -e 192.168.137.11 得到
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host);
nfs服務器192.168.137.11臨時關閉防火墻重啟nfs服務后:
客戶機運行#showmount -e 192.168.137.11得到
Export list for 192.168.137.11:
/home 192.168.137.0/24
/data 192.168.137.12

求教如何不關閉iptables 而完成nfs服務?

作者: Godbach    時間: 2016-04-29 17:26
回復 1# shocking119

show 一下你的 iptables 配置吧。如果確認是 iptables 阻斷的話,調整對應規(guī)則就可以。


   
作者: shocking119    時間: 2016-05-01 01:27
怎么調整對應規(guī)則?求配置參數(shù)。。。謝謝大神
作者: Godbach    時間: 2016-05-03 11:04
回復 3# shocking119

請認真看我的回復。。。


   
作者: shocking119    時間: 2016-05-03 11:16
iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTAB                                          LISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:s                                          sh
REJECT     all  --  anywhere             anywhere            reject-with icmp-ho                                          st-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-ho                                          st-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[root@THTF-V ~]#
回復 2# Godbach


   
作者: Godbach    時間: 2016-05-03 11:32
回復 5# shocking119

iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTAB                                          LISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:s                                          sh
REJECT     all  --  anywhere             anywhere            reject-with icmp-ho                                          st-prohibited


不對啊,這個第三條規(guī)則已經 ACCEPT ALL 了。不會 block 任何請求的。

開啟 iptables 的時候,你從 client 上能夠 ping 通 nfs server  嗎?


   
作者: shocking119    時間: 2016-05-03 16:36
能ping通,類似問題也有出現(xiàn) 請大大移步我另一個帖子:
http://72891.cn/thread-4244475-1-1.html
回復 6# Godbach


   
作者: Godbach    時間: 2016-05-04 13:36
回復 7# shocking119

那你 telnet nfs sever 的端口能通嗎

   
作者: shocking119    時間: 2016-05-05 13:47
臨時關閉防火墻重啟nfs服務后:telnet 能通,同一個問題已經在lamp,nfs,ftp的telnet遇到了。。。
我用的是VMwaer nat模式網絡 是否有關系呢?
回復 8# Godbach


   
作者: Godbach    時間: 2016-05-05 14:49
回復 9# shocking119

有 nat 在啊。那問題確實復雜一些。


   
作者: shocking119    時間: 2016-05-05 16:08
請教主不吝賜教!
回復 10# Godbach


   
作者: Riet    時間: 2016-05-05 17:49
本帖最后由 Riet 于 2016-05-05 17:51 編輯
Godbach 發(fā)表于 2016-05-03 11:32
回復 5# shocking119


第三條規(guī)則應該是針對本地回環(huán)口的,可以加上-v來判斷。

所以你才會在iptables開著的時候 showmount -e 192.168.137.11 失敗, 如果換成showmount -e 127.0.0.1 應該是可以的

iptables里面如果要放行NFS可以添加如下規(guī)則

iptables -A INPUT -p tcp -m multiport --ports 2049,111 -j ACCEPT
iptables -A INPUT -p udp -m multiport --ports 2049,111 -j ACCEPT

請注意你現(xiàn)有iptables的規(guī)則順序,或者直接-I

放行這兩個應該就可以了,如果還不行你可以netstat查看一下NFS用到的其他端口,或者 rpcinfo -p 也可以查看
把這些端口也放行,應該就可以了。


作者: shocking119    時間: 2016-05-12 18:09
結貼:-A INPUT -j REJECT --reject-with icmp-host-prohibited 這條規(guī)則的問題,REJECT 是用來返回一個錯誤的包來回應匹配包,其他的等價于DROP,所以它是一個拒絕TARGET,在規(guī)則的結束。




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2