LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-16-2006, 03:30 AM   #1
dirtgod
LQ Newbie
 
Registered: Oct 2006
Location: Karnataka, India
Distribution: RHEL & Fedora
Posts: 2

Rep: Reputation: 0
How can I configure iptables to allow portmap (rpc services)


Can any one please tell me how to configure iptables to accept portmap services. I want to allow only nfs and nis services but the problem is as they are dependent on portmap, is is tough to predict the port no for me. Thanks in advance.
 
Old 12-16-2006, 03:51 AM   #2
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
RPC services use random ports specified by portmap so under the default configurations, setting open ports with iptables is difficult.
You will need to force a number of rpc services to use fixed ports.

If your using RedHat to do this, go through the /etc/init.d/ files related to nfs to find out how you can fix the relevant ports for rpc.statd, rpc.nfsd, rpc.mountd, rpc.lockd and rpc.rquotad. A good place to start would be the portmap file.

search for lines starting as follows:

daemon rpc.statd

and add the option to fix the port:

daemon rpc.statd -p 3334

You can then easily configure iptables to keep these ports open. be sure to keep the portmap 111 port open.

Last edited by SlackDaemon; 12-16-2006 at 03:54 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPC: failed to contact portmap (errno -5). .... NFS hedpe Linux - Networking 4 12-14-2006 11:17 AM
Getting an RPC errors after turning off services ceci2 Linux - Newbie 2 04-03-2005 02:28 PM
rpc services current patch level amrogers3 Linux - Security 0 03-03-2005 09:53 AM
Portmap and RPC in RHL8 Gabriel2010 Linux - Newbie 3 08-19-2004 01:06 PM
NFS Portmap: RPC: Program not registered fibbi Linux - Software 2 08-12-2004 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:03 PM.

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