Skip to contentSkip to conversation

Default ports to be used by NFS side-band protocol services (lockd, statd, rquotad)

DISCUSSION Soumya Koduri 4 participants 6 messages Sep 14, 2015 – Sep 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

We would like to know what ports could be used by default for service daemons providing other NFS side-band protocols (NLM/NSM/RQUOTA), so that we can define *.xml files for those services as well to be included in firewalld if required.

Request your inputs.

Thanks,
Soumya

#1 lore raw

Hello,

Quoted 5 lines · Soumya Koduri

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

Hmm... I didn't know about this... We should probably
set the -p 20048 by default via /etc/sysconfig/nfs file or maybe the systemd script?

Quoted 5 lines

We would like to know what ports could be used by default for service daemons providing other NFS side-band protocols (NLM/NSM/RQUOTA), so that we can define *.xml files for those services as well to be included in firewalld if required.

The actual port number really does not matter, as long as its not a privileged port (< 1024). What matters is the port you assign to the servers are actually used... Which means the default configuration files (like /etc/sysconfig/nfs) are updated with the given port numbers.

steved.

#2 lore raw
Quoted 10 lines · Steve Dickson [[email protected]] wrote:

Hello,

Quoted 5 lines · Soumya Koduri

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

Hmm... I didn't know about this... We should probably
set the -p 20048 by default via /etc/sysconfig/nfs file or maybe the systemd script?

I believe, mountd already uses /etc/services file by default. So specifying it in /etc/services would be good. I think RHEL7 has one for mountd. This is specific to NFSv3 anyway...

Regards, Malahal.

#3 lore raw
Quoted 8 lines · Malahal Naineni
Quoted 7 lines · Steve Dickson [[email protected]] wrote:

Hello,

Quoted 4 lines · Soumya Koduri

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

Hmm... I didn't know about this... We should probably
set the -p 20048 by default via /etc/sysconfig/nfs file or maybe the systemd script?

I believe, mountd already uses /etc/services file by default. So specifying it in /etc/services would be good. I think RHEL7 has one for mountd. This is specific to NFSv3 anyway...

From '/etc/services' & [1], looks like port# '20048' has been registered to be used by mountd service. Does it help if we have ports registered for other services too then? Or is it better to keep them dynamic and leave it to admin to choose & edit '/etc/sysconfig/nfs' file as required.

[1] http://www.iana.org/assignments/port-numbers

Thanks,
Soumya

Quoted 3 lines

Regards, Malahal.

#4 lore raw
Quoted 15 lines · Soumya Koduri
Quoted 12 lines · Malahal Naineni
Quoted 10 lines · Steve Dickson [[email protected]] wrote:

Hello,

Quoted 5 lines · Soumya Koduri

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

Hmm... I didn't know about this... We should probably
set the -p 20048 by default via /etc/sysconfig/nfs file or maybe the systemd script?

Quoted 9 lines
Quoted 4 lines

I believe, mountd already uses /etc/services file by default. So specifying it in /etc/services would be good. I think RHEL7 has one for mountd. This is specific to NFSv3 anyway...

From '/etc/services' & [1], looks like port# '20048' has been registered to be used by mountd service. Does it help if we have ports registered for other services too then? Or is it better to keep them dynamic and leave it to admin to choose & edit '/etc/sysconfig/nfs' file as required.

[1] http://www.iana.org/assignments/port-numbers

I'm thinking its better to leave it up to the admins...

steved.

#5 lore raw
Quoted 24 lines · Steve Dickson
Quoted 20 lines · Soumya Koduri
Quoted 16 lines · Malahal Naineni
Quoted 10 lines · Steve Dickson [[email protected]] wrote:

Hello,

Quoted 5 lines · Soumya Koduri

Hi,

In the latest Linux distributions (Fedora), ports 2049 (nfs) and 20048 (mountd) are configured to be opened by default by firewalld service.

Files: '/usr/lib/firewalld/services/nfs.xml' & '/usr/lib/firewalld/services/mountd.xml'.

Hmm... I didn't know about this... We should probably
set the -p 20048 by default via /etc/sysconfig/nfs file or maybe the systemd script?

I believe, mountd already uses /etc/services file by default. So specifying it in /etc/services would be good. I think RHEL7 has one for mountd. This is specific to NFSv3 anyway...

Quoted 7 lines
Quoted 4 lines

From '/etc/services' & [1], looks like port# '20048' has been registered to be used by mountd service. Does it help if we have ports registered for other services too then? Or is it better to keep them dynamic and leave it to admin to choose & edit '/etc/sysconfig/nfs' file as required.

[1] http://www.iana.org/assignments/port-numbers

I'm thinking its better to leave it up to the admins...

If that is the case, is there any way to tie the ports assigned to /etc/sysconfig/nfs etc to a set of firewall rules that open those ports for incoming traffic? Having to adjust 2 sets of configurations every time you want to assign a new port is a potential source of errors.

Trond