1833077 Members
2734 Online
110049 Solutions
New Discussion

portmapper on hpux

 
Stephan Hendl
Contributor

portmapper on hpux

Hi all,

I would like to map udp port 162 to udp port 9162
with the rpcbind program that is already include in hpux. How can I do this?

Stephan
3 REPLIES 3
Dave Olker
Neighborhood Moderator

Re: portmapper on hpux

Hi Stephan,

I think you misunderstand what the rpcbind/portmapper does. It does not map one port to another port. I merely maps the port numbers of running RPC programs to their RPC Program numbers, version numbers, and network protocols.

In other words, if systemA needs to talk to RPC program number 100005, version 3, using TCP on systemB it will send a GETPORT call to the rpcbind running on systemB saying "tell me what port number RPC program 100005 version 3 using TCP is listening on". The rpcbind daemon will examine its registration table looking for a match to these parameters. If systemB's rpcbind registration table looks like this:

program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
...
100005 1 udp 49203 mountd
100005 3 udp 49203 mountd
100005 1 tcp 49165 mountd
100005 3 tcp 49165 mountd

Then the request for 100005, V3, TCP will map to port 49165. That is the port number rpcbind will return to the calling system.

Again, the rpcbind/portmapper does not map one port to another. It merely provides a means for remote systems to contact the local system and find out what port number to send requests to if they want to contact an RPC program.

Hope this helps,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Jeff_Traigle
Honored Contributor

Re: portmapper on hpux

Changing the port a service uses is typically done through a daemon configuration. As Dave explained, you don't map a port number to another with rpcbind. I don't know that trapd (the service that uses 162/udp according to /etc/services) can be configured to use any other port. (I don't have a man page for it on an 11.00 system I just looked at and one I found on Google from 1996 didn't mentioned such an option.) snmpd has the -P option to use a port other than 161/udp.
--
Jeff Traigle
Stephan Hendl
Contributor

Re: portmapper on hpux

Thanks for helping me. I realised that portmapper isn't the right way. Then I tried to do that with the ip-filter sw bundle and there in the NAT part where I can redirect IP addrssses and ports as well. But this dosn't helped me at all because the NAT changes the originator IP and the snmpd find differences between the IP address in IP header and in the snmp header ;-(((

Nevertheless I decided to let the thrid party programm listen on port 162 and all works.

Thanks again
Stephan