You are not logged in.

#1 2014-01-16 04:36:24

ke7mbz
Member
Registered: 2013-09-27
Posts: 17

Firewall ports for an NFS client, and systemd automount

I'm trying to understand better how systemd's automount feature works. I configured a systemd nfs mount in /etc/fstab, to mount my home server:

server:/        /SVR         nfs4    x-systemd.automount,noauto,user,defaults                0 0

Then ran systemctl "daemon-reload"

"systemctl --all | grep automount" showed the SVR.automount unit. However, it took a while to actually start working. I'm not really sure what I did to make it work. I tried changing into the directory, using ls, etc. None of this worked. Finally, I think I clicked the entry that had been created in Dolphin's side pane, and it worked.

Generally, I've found online information on this feature a bit scant. Nowhere have I seen a tutorial that really goes through the steps of setting it up.

So, there's the background for the steps I've gone through to this point.

My question is: I didn't open any ports related to NFS in my firewall. So why is it working? Does using systemd to mount the export take care of opening the ports somehow?

On Fedora, I always had to open ports on the server and client for NFS to work.

I know it's working, but I really want to understand why. Otherwise, I don't learning anything from the process, and I don't know how to fix it if something goes wrong.

Offline

#2 2014-01-16 04:46:14

ke7mbz
Member
Registered: 2013-09-27
Posts: 17

Re: Firewall ports for an NFS client, and systemd automount

Follow-up:

I don't think clicking on the link in Dolphin had anything to do with activating the automount. All it was doing was running the mount command.

Does an automount unit have to be started after it's created?

So I really have two questions:
1 - Why didn't I have to open the NFS ports?
2 - What are the steps for setting up an NFS automount for systemd?

Offline

#3 2014-01-16 04:49:30

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Firewall ports for an NFS client, and systemd automount

ke7mbz wrote:

1 - Why didn't I have to open the NFS ports?

Without knowing which firewall(s) (client, server, intermediate?) you're talking about, and what the current rules are, no-one here can tell you.

Offline

#4 2014-01-16 05:26:59

ke7mbz
Member
Registered: 2013-09-27
Posts: 17

Re: Firewall ports for an NFS client, and systemd automount

I'm using firewalld to manage the firewall. The active interface is set to use the "home" zone:

# firewall-cmd --zone=home --list-all
home (active)
  interfaces: wlp2s0
  sources:
  services: dhcpv6-client ipp-client mdns samba-client ssh
  ports:
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

My understanding is that the "services" entries control the open ports.

Offline

Board footer

Powered by FluxBB