Google Serch

Custom Search

Monday, 30 November 2009

NFS and Firewall on Centos & Red Hat

NFS and Firewall on Centos/Red Hat

Today we will talk about some trick on how to enable NFS with Firewall integrated on a Centos or Red Hat server.

Ok, I believe that you already configured a NFS server on Centos or Red hat but you have difficulties to have acces on with the firewall enabled.

This is a trick that I managed to put in place:

  • Create a file "/etc/sysconfig/nfs" and add the following contents:
STATD_PORT=4001
LOCKD_TCPPORT=4002
LOCKD_UDPPORT=4002
MOUNTD_PORT=4003

  • Append the following to the file "/etc/services":
rquotad 4004/tcp # rpc.rquotad tcp port
rquotad 4004/udp # rpc.rquotad udp port

  •  Restart the nfs services
From there, open these ports -> 111:tcp, 111:udp, 2049:tcp, 2049:udp,
4001:tcp, 4001:udp, 4002:tcp, 4002:udp, 4003:tcp, 4003:udp, 4004:tcp,
4004:udp on your firewall configuration.
(you can choose any ports, just be aware that they shall be related to your NFS config).

No comments:

Post a Comment