1833051 Members
2485 Online
110049 Solutions
New Discussion

Re: Telnet Port.

 
SOLVED
Go to solution
Carlos Zampar
Advisor

Telnet Port.


Hi,

I want to add new telnet port on my hp-ux, for example port 5236, and after this I need telnet working on port 23 and 5236. It is possible?

Thanks, regards Cadu.
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Telnet Port.

Well, you can start telnetd using port 23 or 5236 but not both. The port number is determined by the telnet entry in the services file or map. Some versions of telnetd allow you to start telnetd in debug mode and specify an alternate port but the standard HP-UX telnet daemon does not offer this option.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Telnet Port.

shalom,

Yes, but telnet itself is not secure. There is a product secure shell which has a file called sshd_config which permits you to tell it to listen on any port you want.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Aussan
Respected Contributor

Re: Telnet Port.

Hi Carlos
take a look at this link
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01015443-1

if the link does not work, here is the content:

SYS ADM: Adding additional port to listen for telnet through firewall.

Problem Description

I want to set up an additional port to listen for telnet. I
do not want to just change the port that I have for telnet.
The reason I want to configure a second port is that I want
to come to the new port through a firewall.

How do I set up this port?

Configuration Info

Operating System - HPUX
Version - 10.20
Hardware System - HP 9000
Series - D370

Solution

Use the following procedure:

1. Edit inetd.conf and make another entry for telnet. The key is
to call it something else besides telnet, for example, newtelnet.

2. Edit the /etc/services file and make another entry for telnet
changing the name and port number (something high).

3. Stop and start inetd
/usr/sbin/inetd -k
/usr/sbin/inetd


i hope it helps
The tongue weighs practically nothing, but so few people can hold it
whiteknight
Honored Contributor

Re: Telnet Port.

Carlos,

not sure what is the purpose you need another telnet port 5236. Telnet port is port 23 it is a well known ports

http://www.iana.org/assignments/port-numbers.

The following ports and port ranges are used by HP-UX 11i version 1 and HP-UX 11i version 2.
http://docs.hp.com/en/5990-7252/ch01s01.html?btnNext=next%A0%BB


hope this help.
WK
please assign points
Problem never ends, you must know how to fix it
Carlos Zampar
Advisor

Re: Telnet Port.

I´m try Aussan help but not working. Please see my conf files it´s ok?

my inetd.conf:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
newtelnet stream tcp nowait root /usr/lbin/telnetd telnetd

my /etc/services:
ftp 21/tcp # File Transfer Protocol (Control)
telnet 23/tcp # Virtual Terminal Protocol
telnet 5236/tcp # Virtual Terminal Protocol
smtp 25/tcp # Simple Mail Transfer Protocol

And I restart inetd but no working, thank´s for all.
Torsten.
Acclaimed Contributor

Re: Telnet Port.

Make the second telnet entry in /etc/services "newtelnet" too.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
A. Clay Stephenson
Acclaimed Contributor

Re: Telnet Port.

No, you can't have two /etc/service entries for the same service name:

telnet 23/tcp # Virtual Terminal Protocol
telnet 5236/tcp # Virtual Terminal Protocol

you need something like this on the host running the telnet daemon:

telnet 23/tcp # Virtual Terminal Protocol
dumbnet 5236/tcp # Virtual Terminal Protocol


Now, in the /etc/inetd.conf file, find the existing telnet entry and copy it. In the copied entry, change the service_name "telnet" to "dumbnet" and save the file. Next issue an "inetd -c" command.

On the telnet client, you use "telnet hostname 5326".
If it ain't broke, I can fix that.
Carlos Zampar
Advisor

Re: Telnet Port.

Ok guys,

Now the service file:
telnet 23/tcp # Virtual Terminal Protocol
newtelnet 5236/tcp # Virtual Terminal Protocol

And the ined.conf:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
newtelnet stream tcp nowait root /usr/lbin/telnetd telnetd

But not working. I need restart the server?

Best regards...
A. Clay Stephenson
Acclaimed Contributor

Re: Telnet Port.

Dis you issue an inetd -c command?
If it ain't broke, I can fix that.
Carlos Zampar
Advisor

Re: Telnet Port.


Hi guys now is working perfect, in the way that I wanted very thanks for all. I tested and is great.

Best regards...