Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
948 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  configurer Firewall (iptables) pour NFS (les fameux port mountd) ??

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

configurer Firewall (iptables) pour NFS (les fameux port mountd) ??

n°691354
pedretti75
Posté le 10-06-2005 à 09:55:33  profilanswer
 

Bonjour.
 
J'ai monté mon serveur NFS qui fonctionne correctement, sur une passerelle avec Firewall.
 
tout fonctionne correctement, SAUF que lorsque je restart le réseaux ou que je restart mon firewall, les ports udp et tcj de mountd changent  :fou: (#rpcinfo -p ) !
Si bien qu'il ne sont plus ouvert sur le firewall, et donc injoignable.  :sweat:  
 
Comment faire pour indiquer à NFS (mountd ?) de ne travailler que sur certains ports ?
 
merci  :hello:


Message édité par pedretti75 le 10-06-2005 à 14:46:51
mood
Publicité
Posté le 10-06-2005 à 09:55:33  profilanswer
 

n°691501
Dark_Schne​ider
Close the World, Open the Net
Posté le 10-06-2005 à 14:15:06  profilanswer
 

extrait de mon fichier /etc/sysconfig/nfs.
 
regarde MOUNTD_PORT.
 
Cela marche sous redHat et Mandrake/Mandriva. je ne sais pas pour les autres distro
 

Citation :


 
# For more information on nfs tuning, please see the NFS-HOWTO
# http://nfs.sourceforge.net/nfs-howto/
 
# For more information on nfs+iptables, see the great docs by
# Chris Lowth here: http://www.lowth.com/LinWiz/
 
# Pass any additional options for mountd.
# MOUNTD_OPTIONS=
 
# Pin mountd to a given port rather than random one from portmapper
# MOUNTD_PORT=4002
 
# Don't advertise TCP for mount.
# MOUNTD_TCP=no
 
# NFS V3
# MOUNTD_NFS_V3=auto|yes|no
 
# NFS V2
# MOUNTD_NFS_V2=auto|yes|no
 
# The number of open file descriptors
# MOUNTD_OPEN_FILES=128
 
# Pass the number of instances of nfsd (8 is default; 16 or more
# might be needed to handle heavy client traffic)
# RPCNFSDCOUNT=8
 
# Increase the memory limits on the socket input queues for
# the nfs processes .. NFS  benchmark SPECsfs demonstrate a
# need for a larger than default size (64kb) .. setting
# TUNE_QUEUE to yes will set the values to 256kb.
# TUNE_QUEUE="yes"
# NFS_QS=262144
 
# Set fixed ports for lockd
# LOCKD_TCPPORT=4001
# LOCKD_UDPPORT=4001
 
# Set fixed port for remote quota server port
# RQUOTAD_PORT=""
 
# Set fixed port for statd
 STATD_PORT=4000
 
# Set fixed port for statd (outgoing)
# STATD_OUTGOING_PORT=4000
 
# Set statd hostname
# STATD_HOSTNAME=
 
# This is for NFS4
SECURE_NFS=yes
 
# This is options for the gssd daemon
RPCGSSD_OPTIONS="-m"
 
# This is options for the idmap daemon
RPCIDMAPD_OPTIONS=""
 
# This is options for the svcgssd daemon
RPCSVCGSSD_OPTIONS=""


---------------
Mandriva : parce que nous le valons bien ! http://linux-wizard.net/index.php
n°691521
pedretti75
Posté le 10-06-2005 à 14:37:27  profilanswer
 

Dark_Schneider a écrit :

extrait de mon fichier /etc/sysconfig/nfs.
 
regarde MOUNTD_PORT.
 
Cela marche sous redHat et Mandrake/Mandriva. je ne sais pas pour les autres distro
 

Citation :


 
# For more information on nfs tuning, please see the NFS-HOWTO
# http://nfs.sourceforge.net/nfs-howto/
 
# For more information on nfs+iptables, see the great docs by
# Chris Lowth here: http://www.lowth.com/LinWiz/
 
# Pass any additional options for mountd.
# MOUNTD_OPTIONS=
 
# Pin mountd to a given port rather than random one from portmapper
# MOUNTD_PORT=4002
 
# Don't advertise TCP for mount.
# MOUNTD_TCP=no
 
# NFS V3
# MOUNTD_NFS_V3=auto|yes|no
 
# NFS V2
# MOUNTD_NFS_V2=auto|yes|no
 
# The number of open file descriptors
# MOUNTD_OPEN_FILES=128
 
# Pass the number of instances of nfsd (8 is default; 16 or more
# might be needed to handle heavy client traffic)
# RPCNFSDCOUNT=8
 
# Increase the memory limits on the socket input queues for
# the nfs processes .. NFS  benchmark SPECsfs demonstrate a
# need for a larger than default size (64kb) .. setting
# TUNE_QUEUE to yes will set the values to 256kb.
# TUNE_QUEUE="yes"
# NFS_QS=262144
 
# Set fixed ports for lockd
# LOCKD_TCPPORT=4001
# LOCKD_UDPPORT=4001
 
# Set fixed port for remote quota server port
# RQUOTAD_PORT=""
 
# Set fixed port for statd
 STATD_PORT=4000
 
# Set fixed port for statd (outgoing)
# STATD_OUTGOING_PORT=4000
 
# Set statd hostname
# STATD_HOSTNAME=
 
# This is for NFS4
SECURE_NFS=yes
 
# This is options for the gssd daemon
RPCGSSD_OPTIONS="-m"
 
# This is options for the idmap daemon
RPCIDMAPD_OPTIONS=""
 
# This is options for the svcgssd daemon
RPCSVCGSSD_OPTIONS=""



 
Oui en effet, ca doit être la.. mais j'ai pas ce fichier sous Debian  :cry:  
 
Faut que je le trouve !

n°691549
pedretti75
Posté le 10-06-2005 à 15:08:08  profilanswer
 

Ca y est ! j'ai trouvé   :bounce:  
 
sous Debian, il faut éditer le fichier /etc/default/nfs-kernel-server.
 
#vi /etc/default/nfs-kernel-server
 
# Number of servers to start up
RPCNFSDCOUNT=8
 
# Options for rpc.mountd
RPCMOUNTDOPTS="-p 4002"
 
J'ai mis 4002 mais on peut mettre autre chose je pense.
Par contre, maintenant, il utilise ce port en TCP ET UDP. Ca ne doit rien changer.. mais je ne sais pas comment le préciser alors.. surrement une options de mountd.

n°836675
patrick2
V6 power
Posté le 21-08-2006 à 08:59:06  profilanswer
 

bonjour,
en fait tu active juste un port statique par : STATD_PORT=4000
et ensuite tu l'indique a shorewall, c'est ca ? dans autres ports ?
4000/tcp  
4000/udp         ?  
 
ou j'ai mal compris ?
et de cette maniere shorrewall ne bloque plus les requettes NFS des deux cotes ?

n°838496
patrick2
V6 power
Posté le 27-08-2006 à 11:42:52  profilanswer
 

up

n°838504
dam1330
...
Posté le 27-08-2006 à 12:06:32  profilanswer
 

il me semble que la version 4 du serveur propose un port unique ce qui facilite grandement l'utilisation avec un firewall / routeur

n°838959
patrick2
V6 power
Posté le 28-08-2006 à 21:51:52  profilanswer
 

soir'
 :fou:  
sur le pc "patrick" j'ai modifie  
# Set fixed port for statd
STATD_PORT=4000
et  mis dans shorewall :
111/udp 2049/udp 4000/udp 111/tcp 2049/tcp 4000/tcp
j'ai donc acces au pc "emmanuelle"
mais celui ci n'a pas shorewall d'active et j'ai aussi modifie  STATD_PORT=4000  
je n'ai pas acces au pc "patrick"  
je me demande ce qui "bloque"  
ou alors j'ai mal compris, et shorewall bloque de emmanuelle vers patrick ?

n°839369
patrick2
V6 power
Posté le 29-08-2006 à 23:44:03  profilanswer
 

je comprends pas ce que j'aurais pu oublier ....

n°839373
patrick2
V6 power
Posté le 29-08-2006 à 23:50:37  profilanswer
 

# Set fixed port for statd (outgoing)
# STATD_OUTGOING_PORT=4000  
 
c'est peut etre ca non ? le port 4000 a fixer pour les requettes externe . a decommanter

mood
Publicité
Posté le 29-08-2006 à 23:50:37  profilanswer
 

n°896443
ced206
Solaris 10 !
Posté le 20-03-2007 à 19:36:58  profilanswer
 

Salut et sous fedora c'est quel fichier vous savez ?


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  configurer Firewall (iptables) pour NFS (les fameux port mountd) ??

 

Sujets relatifs
distrib firewall et install de logicielPort du theme Solaris X sur linux
distrib firewall + p2pcomment desinstalle symantec firewall 2004?
Bloquer un site web précis (par son @ip) avec iptables[Iptables] problème pour faire du ftp via php
Tunnel IP sur un seul port ?Cherche un logiciel en GTK pour configurer mes imprimantes
[Mandriva] Comment configurer un modem PCMCIA ?Iptables, routeur tout simple
Plus de sujets relatifs à : configurer Firewall (iptables) pour NFS (les fameux port mountd) ??


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR