Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-06-2012, 01:12 PM   #1
LQ Newbie
Registered: Oct 2012
Posts: 5

Rep: Reputation: Disabled
Question how to config nfs service through firewall?

Hi eveybody!!!
I have set static port for all deamon of nfs service
Rquotad is 4000
Mountd is 4005
Statd is 4010
Lockd is 4015
And in the /etc/sysconfig/iptables I added 2 entries
-A INPUT -m multiport -p tcp --dport 111,2049,32687,4000,4005,4010,4014 -j ACCEPT
-A INPUT -m multiport -p udp --dport 111,2049,32687,4000,4005,4010,4014 -j ACCEPT
but when I use client to mount to server ,the server's firewall still eject my request
What I should do now? Or I have somethings wrong?
Thanks for any help
Have a nice day everyone!!
Old 10-06-2012, 07:09 PM   #2
Registered: Dec 2007
Posts: 54

Rep: Reputation: 16
can you post the out put of dmesg?
Old 10-06-2012, 10:53 PM   #3
LQ Newbie
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Originally Posted by jettwa2001 View Post
can you post the out put of dmesg?
here is dmesg on my computer
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	13
Size:	133.7 KB
ID:	10887  

Last edited by kizznewbie; 10-06-2012 at 11:03 PM.
Old 10-07-2012, 08:05 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,927

Rep: Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631Reputation: 2631
Well, the last few msgs there say the nfsd server has exited, so you'd need to fix that.
Try checking
rpcinfo -p
showmount -e localhost
on the server end.

You may also need to add a line like the following to the /etc/hosts.allow file:
portmap: 192.168.0.X
Old 10-08-2012, 07:46 AM   #5
LQ Newbie
Registered: Sep 2012
Location: Bangalore
Distribution: Red Hat, CentOs
Posts: 16
Blog Entries: 1

Rep: Reputation: Disabled
Hi kizznewbie,

On a system that is up and running with the NFS service active, the ports used by the components of the service can be listed using the command “rpcinfo -p”. The output will look something like this...
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32814 status
100024 1 tcp 33024 status
100011 1 udp 670 rquotad
100011 2 udp 670 rquotad
100011 1 tcp 673 rquotad
100011 2 tcp 673 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100021 1 udp 32816 nlockmgr
100021 3 udp 32816 nlockmgr
100021 4 udp 32816 nlockmgr
100005 1 udp 32818 mountd
100005 1 tcp 33025 mountd
100005 2 udp 32818 mountd
100005 2 tcp 33025 mountd
100005 3 udp 32818 mountd
100005 3 tcp 33025 mountd

This listing shows the IP ports for the various versions of the service used in the 4th column. If you view this listing on different systems (or even after rebooting the same one) you may well find that the port numbers are different – this is a real problem when configing firewalls, which tend to assume that known port numbers are used for the services being configured.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
configure nfs service mahnaz Linux - Newbie 7 12-07-2010 02:15 AM
a trouble of nfs service tamenglang Linux - Newbie 1 04-29-2009 02:34 PM
service nfs cannot be changed from off aboulafia Linux - Newbie 3 08-31-2006 03:36 AM
NFS service problem DanielTan Linux - General 22 06-11-2005 10:19 PM
service nfs start Soulful93 Linux - Networking 1 06-13-2004 03:25 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration