NFS 可以关闭反向 DNS 吗?

发布于 2024-07-17 07:36:58 字数 1459 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

山川志 2024-07-24 07:36:58

将 NFS 客户端的 IP 地址放入 NFS 服务器的 /etc/hosts 文件中,并添加如下注释:

# 2009-04-17 Workaround a chicken and egg DNS resolution problem at boot
192.0.2.1 mynfsclient
192.0.2.2 anothernfsclient

然后,添加到您的 Runbook“当更改计算机的 IP 地址时,不要忘记更新 NFS 服务器的主机文件”。

现在,要关闭 NFS 服务器中这个愚蠢的 DNS 测试,这取决于服务器。 您显然没有指出操作系统或服务器类型。

Put the IP address of the NFS clients in the /etc/hosts file of the NFS server with a comment like:

# 2009-04-17 Workaround a chicken and egg DNS resolution problem at boot
192.0.2.1 mynfsclient
192.0.2.2 anothernfsclient

Then, add to your runbook "When changing the IP addresses of a machine, do not forget to update the hosts file of the NFS server".

Now, to shut off this stupid DNS test in the NFS server, it depends on the server. You apparently did not indicate the OS or the server type.

清风夜微凉 2024-07-24 07:36:58

我在旧的 Yellow Machine NAS 盒子上遇到了类似的问题 - 我遇到了 DNS/DHCP 冲突,其中反向查找与正向查找不匹配。

在我们的例子中,只需将所有 IP 的虚拟条目放入 NAS 框 /etc/hosts 即可解决问题。 我什至不需要正确的 IP 名称 - 只需解决 IP 的任何名称即可阻止 mountd 抱怨。

(有趣的旁注 - 至少在 NAS 盒子上的旧版 Linux 中,NFS 错误消息中有一个拼写错误:“DNS 正向查找与反向查找不匹配”)

I had a similar problem with an old Yellow Machine NAS box - I was having DNS/DHCP fights where the reverse lookups were not matching the forward lookups.

In our case, just putting dummy entries in the NAS box /etc/hosts for all the IPs solved the problem. I don't even need to have correct names for the IPs - just any name for an IP solved stopped mountd from complaining.

(Interesting side note - at least in the older version of Linux on the NAS box, there's a typo in the NFS error message: "DNS forward lookup does't match with reverse " )

寒冷纷飞旳雪 2024-07-24 07:36:58

难道您不能将相关服务器的 IP 地址放入 fstab 文件中,而无需进行 dns 查找吗?

Can't you just put the ip address of the server in question in the fstab file and no dns lookup will be required.

凉宸 2024-07-24 07:36:58

它是 NFS v4,问题是所有访问请求都使用反向 DNS 查找来确定用于访问/安全目的的 NFS 域。

我认为您可以通过在 /etc/default/nfs 中放入一行来阻止此行为,其中包含:

NFSMAPID_DOMAIN=jrandom.dns.domain.com

这需要在相互共享/使用 NFS 的所有系统之间进行匹配。 请参阅有关设置 NFSMAPID_DOMAIN 的部分,位于页面末尾,解释了未设置时会发生的情况。

NFSv4 - 比一袋黄鼠狼更有趣。

It's NFS v4, the problem is that all the requests for access use a reverse DNS lookup to determine the NFS domain for access/security purposes.

I think you can stop this behavior by putting a line in /etc/default/nfs containing:

NFSMAPID_DOMAIN=jrandom.dns.domain.com

This needs to match across all the systems that are sharing/using NFS from each other. See the section about Setting NFSMAPID_DOMAIN, which is to the end of the page which explains what happens when it's not set.

NFSv4 - more fun than a bag of weasels.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文