跳转到主内容

网络文件系统(NFS)版本2、3和4是否可通过防火墙运行?

Views:
90
Visibility:
Public
Votes:
0
Category:
clustered-data-ontap-8
Specialty:
nas
Last Updated:

可不使用  

适用场景

Data ONTAP 7 及更早版本

问题解答

NFS版本2和3取决于SUNRPC端口映射程序服务来确定正在运行哪些端口服务。这意味着NFS和各种边带协议可以更改它们侦听的端口。因此、所需的防火墙规则取决于存储系统上NFS服务器的配置。NFS版本4不依赖于SUNRPC端口映射程序并侦听TCP端口2049。它不能使用UDP协议按照RFC 7530进行通信。

尝试通过防火墙使用NFS版本2和3的建议:

注意集群模式Data ONTAP 不支持NFSv2
  1. 使用基于TCP的NFS。  通常、建议使用这种方法、因为路由器通常与防火墙相关联;因此、NFS/TCP将可路由、并且比基于UDP的NFS更可靠。
  2. 要在存储系统上启用基于TCP的NFS、请通过命令行界面之一键入以下命令:
    1. (7-模式)输入 options nfs.tcp.enable on
    2. (集群模式Data ONTAP)输入 vserver nfs modify -tcp enabled
  3. 如果NFS客户端操作系统尚未挂载NFS/TCP、请确保NFS客户端使用NFS/TCP挂载存储器:
    1. 输入以下命令手动挂载NFS/TCP (在某些UNIX NFS客户端上):

      mount -o proto=tcp filer:/vol/volume /mnt_point

    2. 根据/etc/fstab需要编辑UNIX NFS客户端的或等效文件、以便在启动期间挂载NFS/TCP。
  4. 获取存储系统正在侦听的所有NFS端口、并让防火墙管理员允许存储系统与NFS客户端之间通过这些端口进行访问。
    1. 在UNIX NFS客户端中、输入 rpcinfo -p </filer_hostname>
    2. 让防火墙管理员可以访问第4列列出的端口以及rpcinfo输出第3列的协议。

可以通过防火墙设置NFSv2/v3/v4。如果在配置防火墙以使用NFS时遇到问题:

  1. 检查防火墙日志以查看与存储系统之间的网络流量是否已被阻止。如果存储系统之间的流量被阻止、请确定使用了哪些端口、因为可能会阻止NFS流量。
  2. 如果问题仍然存在、请查阅防火墙文档/支持以解决配置问题。 

7-模式存储系统的示例输出:
[root@linux-host ~]# rpcinfo -p filer
   program vers proto   port  service
    100011    1   udp   4049  rquotad
    100024    1   tcp   4047  status
    100024    1   udp   4047  status
    100021    4   tcp   4045  nlockmgr
    100021    3   tcp   4045  nlockmgr
    100021    1   tcp   4045  nlockmgr
    100021    4   udp   4045  nlockmgr
    100021    3   udp   4045  nlockmgr
    100021    1   udp   4045  nlockmgr
    100003    4   tcp   2049  nfs
    100005    3   tcp   4046  mountd
    100003    3   tcp   2049  nfs
    100005    2   tcp   4046  mountd
    100005    1   tcp   4046  mountd
    100003    2   tcp   2049  nfs
    100005    3   udp   4046  mountd
    100003    3   udp   2049  nfs
    100005    2   udp   4046  mountd
    100005    1   udp   4046  mountd
    100003    2   udp   2049  nfs
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper

有关存储系统如何采用静态端口的详细信息、请参见错误70769
 

追加信息

在此处添加您的文本。

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.