LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2008, 04:00 PM   #1
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Rep: Reputation: 20
Question 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
 
Old 11-09-2008, 04:11 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
http://rlworkman.net/howtos/NFS_Firewall_HOWTO
 
Old 11-14-2008, 07:57 PM   #3
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
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
 
Old 11-14-2008, 09:20 PM   #4
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
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
 
Old 11-14-2008, 10:32 PM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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"
 
Old 11-14-2008, 10:44 PM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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" :-)
 
Old 11-15-2008, 03:05 PM   #7
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
Smile

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
 
Old 11-15-2008, 03:07 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by rwcooper View Post
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.
 
Old 06-14-2010, 10:57 AM   #9
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
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
 
Old 06-14-2010, 02:33 PM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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 :-)
 
Old 06-14-2010, 07:27 PM   #11
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
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
 
Old 06-15-2010, 06:33 AM   #12
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
It does not.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable RPC nlockmgr service on RHEL AS 4 - How? tieuphongvan Linux - Networking 4 04-18-2008 01:50 AM
how to assign a host name? Mountain Linux - Newbie 9 11-07-2007 05:07 PM
connect to the internet using fixed wireless cdma phone on serial port akay56 Linux - Wireless Networking 0 07-25-2006 03:48 AM
port probe on fixed IP behind router fails ask Linux - Networking 4 10-22-2005 02:51 PM
assign static ip allelopath Linux - Software 1 04-27-2005 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration