The portmap Service

The base configuration file for the port mapper daemon is /etc/default/portmap. It suggests one command option that is fed to the /etc/init.d/portmap script:

Options are fed to the service script, /etc/init.d/portmap. This script starts the port mapper service, which enables NFS (and NIS) communication via regular TCP/IP ports.

nfs-common Option

Description

NEED_STATD

Boolean (yes or no) option that can activate the network status monitor for remote procedure calls (RPCs)

STANDOPTS

Port-based firewalls block NFS, unless the port for NFS related services are fixed

NEED_IDMAPD

Boolean (yes or no) option that can activate the ID Name Mapper Daemon (IDMAPD)

NEED_GSSD

Boolean (yes or no) option that can activate the Generic Security Services Daemon (GSSD)

Table 16-2. /etc/default/nfs-common Options

The portmap service must be running for NFS shares to work—on clients and servers. If you're having trouble connecting to an NFS server, make sure the portmap daemon is running with the following command:

$ sudo /etc/init.d/portmap restart

Once the portmap service is started, you should be able to run the rpcinfo -p command to review those services that use portmap. The following excerpts from the output from my Ubuntu Server system tell me that portmap (portmapper), rpc.statd (status), rpc.nfsd (nfs), and the rpc.mountd (mountd) daemons are running. If you prefer a port-based firewall such as iptables, pay attention to the port numbers. For example, this output tells me that communication is possible using NFS versions 2, 3, and 4, using both TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) packets.

To enable communication through a firewall, you'll need to fix the port numbers, primarily in the aforementioned /etc/default/ configuration files.

program

vers

proto

port

100000

2

tcp

111

portmapper

100000

2

udp

111

portmapper

100024

1

udp

37952

status

100024

1

tcp

53773

status

100003

2

udp

2049

nfs

100003

3

udp

2049

nfs

100003

4

udp

2049

nfs

100021

1

udp

32987

nlockmgr

100021

3

udp

32987

nlockmgr

100021

4

udp

32987

nlockmgr

100003

2

tcp

2049

nfs

100003

3

tcp

2049

nfs

100003

4

tcp

2049

nfs

100021

1

tcp

54171

nlockmgr

100021

3

tcp

54171

nlockmgr

100021

4

tcp

54171

nlockmgr

100005

1

udp

45402

mountd

100005

1

tcp

40733

mountd

100005

2

udp

45402

mountd

100005

2

tcp

40733

mountd

100005

3

udp

45402

mountd

100005

3

tcp

40733

mountd

Was this article helpful?

0 0

Post a comment