You are not logged in.

#1 2006-12-15 19:58:08

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

NFS: mountd, statd and static port setup trouble

So I am trying to setup NFS while running iptables on a server.  So far I know NFS is working properly, because I can connect remotely while iptables is down. I have also been able to get lockd static by passing the option to the kernel at boot via grub.  What I can't figure out is how to get mountd and statd to a static port #, so that I can successfully mount NFS through iptables.  Anyone been through this care to enlighten a lost soul?  wink

Offline

#2 2006-12-15 22:51:13

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

Re: NFS: mountd, statd and static port setup trouble

Easily done, as long as you don't have a problem patching our nfs-utils package. The patch, from dtw, is available here, and after you apply and rebuild, you can set the mountd and statd ports in /etc/conf.d/nfs. You could do it without the patch by hardcoding the port options in /etc/rc.d/nfsd, but /etc/conf.d/nfs is tidier, IMO, and also doesn't get overwritten on upgrade.

For my purposes, I also needed to set the port for lockd, but this is done in /etc/modprobe.conf, as an option for the lockd kernel module.

Offline

#3 2006-12-15 22:58:19

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: NFS: mountd, statd and static port setup trouble

Frustrating that patch has been merged yet...

Offline

#4 2006-12-16 02:02:49

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

Re: NFS: mountd, statd and static port setup trouble

Thanks for the reply tomk.  I have installed using PKGBUILD via abs before, but I'm not sure how to apply the patch properly. Should I execute the patch from the PKGBUILD file?

BTW, thanks for the patch dtw.

Offline

#5 2006-12-16 08:58:19

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

Re: NFS: mountd, statd and static port setup trouble

It's a packaging patch, not an application patch, so once you have the nfs-utils PKGBUILD and other build files in a dir somewhere, put the patch in there as well and do

patch -Np1 -i nfs-with-rename.patch

Then go ahead with makepkg, as normal.

Offline

#6 2006-12-16 13:57:31

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

Re: NFS: mountd, statd and static port setup trouble

So, I got errors during the makepkg. I'm not sure why, I even tried to build the package clean without the patch applied.

*scratches head*

getkversion.c:17: error: 'UTS_RELEASE' undeclared (first use in this function)
getkversion.c:17: error: (Each undeclared identifier is reported only once
getkversion.c:17: error: for each function it appears in.)
make[2]: *** [getkversion-getkversion.o] Error 1
make[2]: Leaving directory `/var/abs/daemons/nfs-utils/src/nfs-utils-1.0.10/tools/getkversion'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/abs/daemons/nfs-utils/src/nfs-utils-1.0.10/tools'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.  Aborting...

Offline

#7 2006-12-16 17:26:36

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

Re: NFS: mountd, statd and static port setup trouble

Oh yeah - forgot about that - sorry. :oops:

The general concensus (Fedora, LFS, etc) is that the getkversion and getiversion targets for make are no longer required, so if you add

sed -i 's|getiversion getkversion ||' tools/Makefile.in

to the PKGBUILD just before the ./configure line, you'll be fine.

Offline

#8 2006-12-16 19:44:44

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

Re: NFS: mountd, statd and static port setup trouble

Done deal, it worked~!

Thanks again for the help tomk. smile

Offline

Board footer

Powered by FluxBB