Score:1

NFS not allowing hosts specified in config to mount share

cn flag

I am having an issue where NFS is refusing to allow hosts that are specified in the config file to mount the share.

I am running an NFS server on Debian 10, BTRFS filesystem.

my /etc/exports reads:

/share  192.220.189.0/24(rw,sync,no_subtree_check) *.domain.lan(rw,sync,no_subtree_check)

I am trying to mount from host.domain.lan, but when I try to mount the share I get the following:

mount.nfs: access denied by server while mounting server.domain.lan:/share

The server log reads:

rpc.mountd[PID]: refused mount request from <host.domain.lan's ip> for /share (/share): unmatched host

I have verified that the server can resolve host.domain.lan's hostname courtesy of a local DNS server.

The mounting DOES work if I explicitly specify host.domain.lan in /etc/exports as opposed to *.domain.lan. This will not do however as I want to serve the folder to an entire subdomain of FQDNs.

I can find nothing about this online, and I have exhausted every option I can think of, please help!

Michael Hampton avatar
cz flag
Is that your only export?
james avatar
cn flag
@MichaelHampton No, I have another export set up exactly like the one in the post.
Score:1
nc flag

Likely the domain name is not resolving correctly in DNS.

What do you get if you use the host command on the server to try to resolve the client's ip address to a hostname? DNS may not have the correct reverse mapping set up for this to work.

james avatar
cn flag
It returns `Host not found: 3(NXDOMAIN)`. Which is weird, because if I explicitly specify host.domain.lan, it mounts just fine.
user10489 avatar
nc flag
It's not weird... it's not even unusual. The name is registered for forward resolution but not reverse resolution. It has to be registered for both directions for this to work.
james avatar
cn flag
Works perfectly after setting up reverse DNS resolution. Thank you! For anyone reading this in the future, when setting up your PTR records, remember to use `host.domain.lan.`, not `host.domain.lan`. Would have saved me hours knowing this.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.