Operating System - HP-UX
1831622 Members
2240 Online
110027 Solutions
New Discussion

Re: port forwarding problem

 
Klaus Claassen
Occasional Contributor

port forwarding problem

Hi,

on a HP-UX 11.0 machine, I have an application
using port "A", let's say port number 2000.
I'd like to forward this port to another
port on the same computer, e.g. port number 3000.

It can be done with ssh, e.g.
ssh -f -L 3000:localhost:2000 localhost tail -f /dev/null

But is it possible to achieve this
without using ssh?
Does it matter if port number "A" is
less than 1024 ?


Regards,
Klaus Claassen
7 REPLIES 7
Jordan Bean
Honored Contributor

Re: port forwarding problem


You might experiment using inetd and telnet.

In /etc/services:
portfwd 2000/tcp

In /etc/inetd.conf:
portfwd stream nowait nobody /usr/bin/telnet portwd -8 localhost 3000

If it fails, then it won't run as nobody. Try again another non-root, non-system account.

I wouldn't recommend this, but it should work.

Jordan Bean
Honored Contributor

Re: port forwarding problem

NO! No points. I'm an idiot. Guess what I forgot: Telnet kicks back the message "Connecting..." upon invocation. (Gosh, the things you forget being an ssh user.)
U.SivaKumar_2
Honored Contributor

Re: port forwarding problem

Hi,
It is not possible using normal inetd . I would
suggest you to use rinetd .
You can read about it and download from this link

http://www.boutell.com/rinetd/

regards,
U.SivaKumar

Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: port forwarding problem

hi,
You can't get the source of rinetd compiled , you can get pynetd (python script) for this
purpose.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Andrew Cowan
Honored Contributor

Re: port forwarding problem

You could try this product: http://www.winton.org.uk/zebedee/

I've never used it but have heard good things about it.

Good luck,
Andrew

Re: port forwarding problem

Hi Klaus,

This is actually a reply to your question about using adb to find the amount of physical memory on Itanium systems. I couldn't reply to that thread (http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=762540) as it is already closed. The adb command did not work as the variable is 8 bytes long and the D format prints only 4 bytes.

In this case it is better to use adb without the -o option. The following command will give you the output you want:

echo phys_mem_pages/jd|adb /stand/vmunix /dev/kmem

Regards,
Lal
With God, all things are possible
Klaus Claassen
Occasional Contributor

Re: port forwarding problem

Hi Lal !

I reopened the "memory question" thread,
please re-post your answer there,
it will certainly be helpful for other
readers, too. (I'll award the points there)

Thanks,
Klaus