You are not logged in.

#1 2010-03-02 06:07:10

oiad
Member
Registered: 2010-03-02
Posts: 22

[SOLVED] NFS Static Ports

Hi, I just switched over to Arch a couple of days ago.  I have been extremely pleased with this distro, but am confused on one part.  I have an IPCOP firewall setup with dmz pinholes from blue to green for a couple of nfs shares.  For this I have to have the nlockmgr, status, and mountd on static IP's.  In other distros I have followed these steps:

1. Create the file "/etc/sysconfig/nfs" and add the following contents:

STATD_PORT=4001
LOCKD_TCPPORT=4002
LOCKD_UDPPORT=4002
MOUNTD_PORT=4003

2. Append the following to the file "/etc/services":

rquotad 4004/tcp # rpc.rquotad tcp port
rquotad 4004/udp # rpc.rquotad udp port

3. Restart the nfs services

This does not seem to work in Arch though.  Can someone point me in the right direction to setting these ports to static??

Thanks

Last edited by oiad (2010-06-18 04:47:03)

Offline

#2 2010-03-02 07:32:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] NFS Static Ports

For rpc.statd and rpc.mountd, have a look at /etc/conf.d/nfs-common.conf and /etc/conf.d/nfs-server.conf respectively.

lockd is a kernel module, so I was about to suggest using /etc/modprobe.d/* to set the nlm_tcpport and nlm_udpport options... until, that is, I found that these options seem to have disappeared:

$ modinfo lockd
filename:       /lib/modules/2.6.33-ARCH/kernel/fs/lockd/lockd.ko
license:        GPL
description:    NFS file locking service version 0.5.
author:         Olaf Kirch <okir@monad.swb.de>
depends:        sunrpc
vermagic:       2.6.33-ARCH SMP preempt mod_unload 
parm:           nsm_use_hostnames:bool
parm:           nlm_max_connections:uint

which is puzzling, because they still seem to work for me. I also use IPCop, btw.

Hope that helps - sorry it's not more conclusive.

/me goes googling for missing module options... smile

Offline

#3 2010-03-03 07:15:16

oiad
Member
Registered: 2010-03-02
Posts: 22

Re: [SOLVED] NFS Static Ports

Thanks for the reply.  The first steps worked perfectly.  I am still trying to figure out the nlockmanager port though, my googling hasn't turned up much.  Are you saying that your ipcop is setup with nfs > dmz holes and it works?

Offline

#4 2010-03-03 11:20:33

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] NFS Static Ports

Yes it works fine. The nfs server, on ipcop's green subnet, has the following in /etc/modprobe.d/* :

# Static ports for NFS lockd
options lockd nlm_udpport=2232 nlm_tcpport=2232

as well as the /etc/conf.d/* settings, which results in this:

$ rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp   2231  status
    100024    1   tcp   2231  status
    100021    1   udp   2232  nlockmgr
    100021    3   udp   2232  nlockmgr
    100021    4   udp   2232  nlockmgr
    100021    1   tcp   2232  nlockmgr
    100021    3   tcp   2232  nlockmgr
    100021    4   tcp   2232  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100005    3   udp   2233  mountd
    100005    3   tcp   2233  mountd

'rpcinfo -p <server>' on the client, which is on ipcop's blue subnet', gives the same output. I have setup pinholes for the five ports listed.

See if the modprobe settings work for you.

Offline

#5 2010-03-04 04:13:00

oiad
Member
Registered: 2010-03-02
Posts: 22

Re: [SOLVED] NFS Static Ports

Thanks for the help it, all of the ports are static now.  I had tried this a couple of times, but didn't realize that I should restart the computer after adding it, I was just restarting nfs daemons.  Thanks again!!!

Offline

#6 2010-03-04 06:53:06

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] NFS Static Ports

Actually you didn't need to restart the computer - you just needed to unload/reload the lockd module.

Anyway, glad it's working, although I still don't know why those lockd options are no longer listed.

Offline

Board footer

Powered by FluxBB