You are not logged in.
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?
Offline
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
Frustrating that patch has been merged yet...
Offline
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
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
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
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
Done deal, it worked~!
Thanks again for the help tomk.
Offline