RPC Ports

I am having a dilema with RPC. I have 2 systems separated by a firewall. Lets say system A is outside and system B is inside. Port 111 is open from system A to B. Port 32000 is also open from system A to B. B is running a program which registers port 32000 with RPC, and it changes everytime the program restarts. System A is unable to communicate to system B once the program restarts and registeres port 32345 and the firewall needs to be reconfigured.

My question is:

How would I force my RPC program to listen on a specific port such as the NFS process? It always gets port 2049 and I'd like to have my program always get port 32000 from the portmapper.
snickherAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

j2Commented:
RPC is based on random ports >32000 not much one can do about that.
0
snickherAuthor Commented:
How does NFS do it?
0
jammannCommented:
NFS doesn't really use the portmapper (aka rpcbind), rather for historcial reasons NFS is fixed to port 2049.

If you don't have the source code to the app in question, you're pretty much hosed.

If you have access to the source of the RPC program in question, you can use some of the lower layer functions of RPC. Instead of just registering your service and let RPC choose the port, you can use svc_fd_create() to create an RPC service on a previously opened and bound socket.

Another option would be to use an intelligent Firewall, that knows about RPC. e.g. the Sun Screen firewall can be configured to allow certain RPC programs, regardless of what port it will be dynamically assigned
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kodiakbearCommented:
Fixed the -1 problem on this question.
Escrow points corrected.

kb
Community Support Moderator
Experts Exchange
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.