Operating System - HP-UX
1819933 Members
3417 Online
109607 Solutions
New Discussion юеВ

telnetd localhost 8787 connection refused

 
Stew Walker
New Member

telnetd localhost 8787 connection refused

On a HP-UX rx4640 Itanium 11iV2 system

I need to allow an app to create a local host connection using telnet on port 8787.

/etc/services has an entry for 8787

wwizsc 8787/tcp #SecureConnect 4.0.10.ssl

I have an entry in hosts.allow

telnetd:localhost

from the prompt I can do telnet localhost which works fine.. if i do telnet localhost 8787 I get

telnet: Unable to connect to remote host: Connection is refused.

I'm leaving something out but don't know what it is..

Any help greatly appreciated
Thanks


7 REPLIES 7
spex
Honored Contributor

Re: telnetd localhost 8787 connection refused

Hi,

1) Change this entry in /etc/services:
telnet 23/tcp # Virtual Terminal Protocol
to:
telnet 8787/tcp # Virtual Terminal Protocol

2) Restart inetd:
# inetd -c

3) Connect:
# telnet localhost 23
Trying...
telnet: Unable to connect to remote host: Connection refused
# telnet localhost 8787
Trying...
Connected to localhost.

However, your example makes me think you meant to say "ssh" instead of "telnet". Is this correct?

PCS
Stew Walker
New Member

Re: telnetd localhost 8787 connection refused

No I didn't mean ssh..
Per the Instructions

telnet localhost 8787 is required.

Can't change 23 to 8787 as this will affect other apps using 23.

Is there another port in the /etc/services file that hp-ux knows about I could use with telnet
without screwing other things up.

Thanks.
spex
Honored Contributor

Re: telnetd localhost 8787 connection refused

Hello again,

1) Ensure the following entries are in /etc/services:
telnet 23/tcp # Virtual Terminal Protocol
telnet_alt 8787/tcp # Virtual Terminal Protocol

2) Ensure the following entries are in /etc/inetd.conf:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
telnet_alt stream tcp nowait root /usr/lbin/telnetd telnetd

3) # inetd -c

4) Verify inetd is listening on both ports:
# netstat -a | grep telnet
tcp 0 0 *.telnet_alt *.* LISTEN
tcp 0 0 *.telnet *.* LISTEN

5) Connect:
# telnet localhost 23
Trying...
Connected to localhost.
# telnet localhost 8787
Trying...
Connected to localhost.

Alternatively, install netcat and set up port forwarding from 8787/tcp to 23/tcp.

PCS



Peter Nikitka
Honored Contributor

Re: telnetd localhost 8787 connection refused

Hi,

I think you misinterpreted the instructions:
Enabeling a connection to a REAL telnetd running on port 8787 would bring no benefit.

What would make sense: if you are
running a real application (daemon or not) on a port like 8787, you could CHECK with a
telnet localhost 8787
IF the application is listening an that port.

Check your instructions how to start the application daemon, which listens on that port.
Then the 'telnet' check will succeed.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Stew Walker
New Member

Re: telnetd localhost 8787 connection refused

Issue Resolved.

It was the entry in /etc/inetd.conf.

Fixed it up per the last response and its working.

netstat -an |grep 8787
tcp 0 0 *.8787 *.* LISTEN


You guys/gals are really great.

Thanks you.
Stew Walker
New Member

Re: telnetd localhost 8787 connection refused

Have it working now.

Thanks all.
Peter Nikitka
Honored Contributor

Re: telnetd localhost 8787 connection refused

Hi,

so it was a good welcome to our forum!

Because you are new here, I want to put your attention to the point system. Information is found at the left panel 'How to earn points'.

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"