Nfs: Difference between revisions

From Halfface
Jump to navigation Jump to search
(New page: ==Change fixed ports for nfs the hard way.== rpc.statd [root@anden ~]# diff /etc/init.d/nfslock{,.bak} 80c80 < daemon rpc.statd -p 4000 "$STATDARG" --- > daemon rpc.statd...)
 
No edit summary
 
Line 23: Line 23:
Daemon Name
Daemon Name
portmap 111 iptables -A block -p udp -m udp --dport 111 -j ACCEPT
portmap 111 iptables -A block -p udp -m udp --dport 111 -j ACCEPT
rpc.statd 4000 iptables -A block -p udp -m udp --dport 111 -j ACCEPT
rpc.statd 4000 iptables -A block -p udp -m udp --dport 111 -j ACCEPT
rpc.nfsd 2049 iptables -A block -p udp -m udp --dport 2049 -j ACCEPT
rpc.nfsd 2049 iptables -A block -p udp -m udp --dport 2049 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 2049 -j ACCEPT
      iptables -A block -p tcp -m tcp --dport 2049 -j ACCEPT
rpc.lockd 4001 iptables -A block -p udp -m udp --dport 4001 -j ACCEPT
rpc.lockd 4001 iptables -A block -p udp -m udp --dport 4001 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4001 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4001 -j ACCEPT
rpc.mountd 4002 iptables -A block -p udp -m udp --dport 4002 -j ACCEPT
rpc.mountd 4002 iptables -A block -p udp -m udp --dport 4002 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4002 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4002 -j ACCEPT
rpc.rquotad 4003 iptables -A block -p udp -m udp --dport 4003 -j ACCEPT
rpc.rquotad 4003 iptables -A block -p udp -m udp --dport 4003 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4003 -j ACCEPT
iptables -A block -p tcp -m tcp --dport 4003 -j ACCEPT
==Change fixed ports for nfs the easy way.==
==Change fixed ports for nfs the easy way.==
Line 92: Line 92:
  #RPCSVCGSSDARGS=""
  #RPCSVCGSSDARGS=""
  #
  #
[[Category:Applications]]
[[Category:Unix]]
[[Category:Storage]]

Latest revision as of 14:58, 20 October 2008

Change fixed ports for nfs the hard way.

rpc.statd

[root@anden ~]# diff /etc/init.d/nfslock{,.bak}
80c80
<       daemon rpc.statd -p 4000 "$STATDARG"
---
>       daemon rpc.statd "$STATDARG"

rpc.lockd

/etc/modules.conf
options lockd nlm_udpport=4001 nlm_tcpport=4001

rpc.mountd

[root@redhat-strait ~]# cat /etc/sysconfig/nfs
MOUNTD_PORT=4002

rpc.rquota

/etc/services
rquotad         4003/tcp                        # quota
rquotad         4003/udp                        # quota

Daemon Name

portmap		111		iptables -A block -p udp -m udp --dport 111 -j ACCEPT
rpc.statd	4000		iptables -A block -p udp -m udp --dport 111 -j ACCEPT
rpc.nfsd	2049		iptables -A block -p udp -m udp --dport 2049 -j ACCEPT
      				iptables -A block -p tcp -m tcp --dport 2049 -j ACCEPT
rpc.lockd	4001		iptables -A block -p udp -m udp --dport 4001 -j ACCEPT

iptables -A block -p tcp -m tcp --dport 4001 -j ACCEPT

rpc.mountd	4002		iptables -A block -p udp -m udp --dport 4002 -j ACCEPT
				iptables -A block -p tcp -m tcp --dport 4002 -j ACCEPT
rpc.rquotad	4003		iptables -A block -p udp -m udp --dport 4003 -j ACCEPT

iptables -A block -p tcp -m tcp --dport 4003 -j ACCEPT

Change fixed ports for nfs the easy way.

If /etc/sysconfig/nfs is supported use the following config file.

#
# Define which protocol versions mountd
# will advertise. The values are "no" or "yes"
# with yes being the default
#MOUNTD_NFS_V1="no"
#MOUNTD_NFS_V2="no"
#MOUNTD_NFS_V3="no"
#
#
# Path to remote quota server. See rquotad(8)
#RQUOTAD="/usr/sbin/rpc.rquotad"
# Port rquotad should listen on.
RQUOTAD_PORT=4003
#Optinal options passed to rquotad
#RPCRQUOTADOPTS=""
#
#
# TCP port rpc.lockd should listen on.
LOCKD_TCPPORT=4001
# UDP port rpc.lockd should listen on.
LOCKD_UDPPORT=4001
#
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
#RPCNFSDARGS
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=8
#
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
MOUNTD_PORT=4002
#
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
#STATDARG=""
# Port rpc.statd should listen on.
STATD_PORT=4000
# Outgoing port statd should used. The default is port
# is random
#STATD_OUTGOING_PORT=2020
# Specify callout program
#STATD_HA_CALLOUT="/usr/local/bin/foo"
#
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
#RPCIDMAPDARGS=""
#
# Set to turn on Secure NFS mounts.
#SECURE_NFS="yes"
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
#RPCGSSDARGS=""
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
#RPCSVCGSSDARGS=""
#