LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Assign fixed port to nlockmgr (https://www.linuxquestions.org/questions/slackware-14/assign-fixed-port-to-nlockmgr-682022/)

rwcooper 11-08-2008 04:00 PM

Assign fixed port to nlockmgr
 
Hi,

I'm running Slackware 12.1 and I'd like to assign fixed udp and tcp port numbers to nlockmgr. I can't find any documentation on how to do this in Slackware. I have found things suggested for other distributions but none of them seem to apply (basically they specify files to edit). I'd also like to know how nlockmgr gets started. I have all the other processes that show up for rpcinfo -p using fixed ports. I want to get them all set up with fixed port numbers so that I can use those port numbers in a set of firewall rules.

Thanks for any help you are able to provide.

Randy

rworkman 11-09-2008 04:11 PM

http://rlworkman.net/howtos/NFS_Firewall_HOWTO

rwcooper 11-14-2008 07:57 PM

Rick,

Thanks for you reply. I had already done everything in your howto prior to posting.

# cat /etc/modprobe.d/lockd
options lockd nlm_udpport=4001 nlm_tcpport=4001

I had also tried replacing lockd with nlockmgr in the above but that did not help.

Does it matter that I see nlockmgr, as shown below, and your example is for lockd?

100021 1 udp 60350 nlockmgr
100021 3 udp 60350 nlockmgr
100021 4 udp 60350 nlockmgr
100021 1 tcp 47943 nlockmgr
100021 3 tcp 47943 nlockmgr
100021 4 tcp 47943 nlockmgr

Thank you,
Randy

rwcooper 11-14-2008 09:20 PM

Hi,

I think maybe the problem is that lockd is not configured as as a loadable module. When I do a make menuconfig I can not determine what I need to change to make lockd a loadable module. Can anyone tell me where to specify this? I know how to compile the kernel and make the modules, just not what I need to change/specify.

Thanks,
Randy

rworkman 11-14-2008 10:32 PM

I'm not sure where that is in the config (I'll poke around in a bit), but for the time being, you can use kernel appends to do the same thing. In lilo.conf, put this:
append = "lockd.nlm_tcpport=4045 lockd.nlm_udpport=4045"

rworkman 11-14-2008 10:44 PM

I have no idea how to tune whether LOCKD is modular or not, unless you edit the .config file directly. Pat's .config looks like this:
Code:

CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_XPRT_RDMA=m
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_RPCSEC_GSS_SPKM3=m

so I would expect CONFIG_LOCKD would be in the Network File Systems menu. However, it's not. A search for LOCKD in menuconfig doesn't tell where it's located either, so all I can say is "good luck" :-)

rwcooper 11-15-2008 03:05 PM

Hi,

Thanks for your reply. Sorry for getting your name wrong Robby, I used to work with a RIck Workman.

I have resolved the problem by making lockd a module. To do this I specified that NFS file system support should be a module and then recompiled the kernel and installed the modules.

Randy

rworkman 11-15-2008 03:07 PM

Quote:

Originally Posted by rwcooper (Post 3343058)
Thanks for your reply. Sorry for getting your name wrong Robby, I used to work with a RIck Workman.

Ha! I didn't even notice that, but sure, no problem :-)

Quote:

I have resolved the problem by making lockd a module. To do this I specified that NFS file system support should be a module and then recompiled the kernel and installed the modules.
Okay, good.

rwcooper 06-14-2010 10:57 AM

Hi,

I'm upgrading to Slackware 13.1 and getting lockd built as a module now requires that NFS client support be specified as a module under File Systems -> Network File Systems when rebuilding the kernel. NFS server support is still required to be built as a module as well (but that's the default for 13.1).

I hope this helps anyone else trying to build lockd as a module.

Randy

rworkman 06-14-2010 02:33 PM

The howto doc is updated with the way to handle that now:

Code:

In Slackware 13.1, which has a 2.6.33.x kernel, you will instead need to
place the following in /etc/sysctl.conf:

  fs.nfs.nlm_udpport=4045
  fs.nfs.nlm_tcpport=4045

See http://rlworkman.net/howtos/NFS_Firewall_HOWTO again :-)

rwcooper 06-14-2010 07:27 PM

When using /etc/sysctl.conf do you known if lockd still needs to be built as a module? The old way still works but requires lockd to be built as a module.

Thanks,
Randy

rworkman 06-15-2010 06:33 AM

It does not.


All times are GMT -5. The time now is 08:33 AM.