Binding ports for NFS

Res res at ausics.net
Fri Dec 16 07:28:52 UTC 2005


Hi,

On Thu, 15 Dec 2005, redhatdude at bellsouth.net wrote:

> Let's see if I have more luck with this question and somebody answers it.
> I'm trying to share a folder using NFS. The problem I'm having is with the 
> ports some of the daemons use and the firewall. The ports for portmapper and 
> nfsd remain the same all the time and I can open them in the firewall. 
> However, daemons such as lockd and mountd change every time I load the nfs 
> service. What I'd like to do is bind these daemos to a specific port that 
> would remain open in the firewall. How can I accomplish that?

You should know the IP of the server in question, allow that server 
unrestricted access in your firewall, if its on your LAN, have the router 
filter 2049 and 111 completely from the internet (tcp and udp)

Also if your LAN is 192.168.0.0/24 in your 
/etc/hosts.allow:

portmap: 192.168.0.1/255.255.255.0
lockd: 192.168.0.1/255.255.255.0
statd: 192.168.0.1/255.255.255.0
mountd: 192.168.0.1/255.255.255.0
rquotad: 192.168.0.1/255.255.255.0

If you only want to put in single IP's put them in in this format:
SERVICETYPE: 192.168.0.1 , 192.168.0.254
note, yes thats -  I.P space comma space I.P

and in /etc/hosts.deny:

portmap: ALL
lockd: ALL
statd: ALL
mountd: ALL
rquotad: ALL



-- 
Cheers
Res




More information about the users mailing list