LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how to custom port mountd nfs ? (https://www.linuxquestions.org/questions/slackware-14/how-to-custom-port-mountd-nfs-658955/)

WorldIsNotFair 07-29-2008 04:38 AM

how to custom port mountd nfs ?
 
Hello brotha,

Need a hand,

How we can custom that ?

I noticed on fedora dist, we can custom it on /etc/sysconfig/nfs,

but i don't know how to do it on slackware.


Any Slackers, please help me ...


Thanks.

TSquaredF 07-30-2008 08:44 AM

I think you have gotten no replies because you have not given enough information. What do you want to do? What do you mean by "custom", is it "customize"? I have never needed a file to customize nfs mounts. Explain a little more, please.
Regards,
Bill

WorldIsNotFair 07-31-2008 12:43 AM

Ok Bill,

Thanks for replying.

Yes, i mean customize the port for port that related to nfs services so that we can config iptables rules more easy.

From what that i learn, these are the related port :
- portmap
- mountd
- statd
- nlockmgr
- rquotad

On redhat based distros, i change those port to 4002-4005 (except portmap).

There is an issues with iptables if the portmapper run dynamically, so i want to customize the related port.

If the other distros can do, i'm sure slackware can do it, i just can't figure it out.

Please help brotha.


Regards,

Heinz

TSquaredF 07-31-2008 06:55 PM

Well, Heinz, now that I know what you want, I can't help you. I've never had to do that nor ever researched it, so I have no clue.
Sorry,
Bill

Franklin 07-31-2008 10:06 PM

Well, take a look at the man page for mountd

man mountd

One of the options is the following:
Code:

-p  or  --port num
              Force rpc.mountd to bind to the specified port num, instead of using the  ran-
              dom port number assigned by the portmapper.

That's a capital P by the way ...

Now, what to do with that. Looking at /etc/rc.d/rc.nfsd you can see the following section:
Code:

if [ -x /usr/sbin/rpc.mountd ]; then
    echo "  /usr/sbin/rpc.mountd"
    /usr/sbin/rpc.mountd
fi

This might be a good place to use the -P option. Something like:
Code:

if [ -x /usr/sbin/rpc.mountd ]; then
    echo "  /usr/sbin/rpc.mountd"
    /usr/sbin/rpc.mountd -P <fixed port#>
fi

Total guess here. Never done it myself.

Another option might be in install webmin which may allow easier manipulation of this and other parameters. get the SlackBuild slackbuilds.org.

bgeddy 07-31-2008 11:01 PM

This is covered in some detail in the Slack Wiki here :

http://slackwiki.org/NFS_and_Firewall

Thanks to our benefactor Robby Workman. This should get you going.

WorldIsNotFair 08-01-2008 11:58 AM

Thanks for all replies bro.

I had tested it and it works except for nlockmgr.

Showmount and rpcinfo is working.

I will continue to use slack for my desktop, thanks to you all, really appreciated.


Regards,

Heinz

bgeddy 08-01-2008 01:25 PM

From the link I posted - credit again to R.Workman..

Quote:

Finally, make the lock daemon listen on port 4045 only - note that this requires
setting module load options in a file in /etc/modprobe.d/ - I create an aptly
named file of /etc/modprobe.d/lockd and add the following:

options lockd nlm_udpport=4045 nlm_tcpport=4045
This seems relevant to the nlockmgr ports.

WorldIsNotFair 08-02-2008 02:54 AM

thanks bgeddy, but i already tried it, doesn't work.

should i supposed to activate some modules and recompile kernel for that ?

coz i don't know any modules related to this and i believe that i'm not running nfsd as module.

hey, on belowed page from his wiki, he said bout irc channel, do u know what channel ?


Regards,

Heinz

bgeddy 08-02-2008 12:47 PM

Are you running the installed "huge" kernel ? If so this won't work. It is recommended to switch to the generic kernel anyway after installation. From the CHANGES_AND_HINTS on the install media :
Quote:

Use one of the provided generic kernels for daily use. Do not report
bugs until/unless you have reproduced them using one of the stock
generic kernels. You will need to create an initrd in order to boot
the generic kernels - see /boot/README.initrd for instructions.
This will load lockd as a module and then the /etc/modprobe.d/lockd will take effect.

You don't need to recompile your kernel for this.

Robby Workman frequents the ##slackware irc channel so I suppose this is the one he's referring to.

WorldIsNotFair 08-03-2008 12:49 PM

Thanks bgeddy,

I install smp generic kernel + kernel modules, its work,

But my battery power meter dissapeared now .. lol ...

Thanks for you all.

bgeddy 08-03-2008 07:13 PM

Glad to see it works - but - if you are having difficulties with the power meter perhaps you might want to start a different thread here for help ?

I'm sure the Slackware folks will respond.

WorldIsNotFair 08-03-2008 10:33 PM

I had edit the kernel conf and recompile it, no issue now bro.

Thanks, you're very nice.

T3slider 08-04-2008 03:14 PM

Quote:

Originally Posted by WorldIsNotFair
I had edit the kernel conf and recompile it, no issue now bro.

For the record, all you had to do to enable the battery power meter was uncomment/add a line in /etc/rc.d/rc.modules-$(uname -r) that loads the proper module. For example, this line in /etc/rc.d/rc.modules-2.6.24.5-smp:
Code:

# Battery (adds battery information through/proc/acpi/battery):
#/sbin/modprobe battery


WorldIsNotFair 08-05-2008 03:28 AM

Great info,

i'm still using 2.6.21.5-smp , i can't find battery modules on /lib/modules/$(uname -r), when i run modprobe, module not found.

is it only applied to 2.6.24.5-smp?


Thanks T3slider.


All times are GMT -5. The time now is 06:42 AM.